sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh
| # MIT License | |
| # | |
| # Copyright (c) 2019 Cristian Adam | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to deal | |
| # in the Software without restriction, including without limitation the rights | |
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| # copies of the Software, and to permit persons to whom the Software is | |
| # furnished to do so, subject to the following conditions: |
For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.
After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft
| #!/bin/bash | |
| ## see: http://github.com/frgomes/debian-bin/blob/master/bash_80proxy.sh | |
| SCRIPT=/home/rgomes/bin/bash_80proxy.sh | |
| ## INTF is the network interface, either a wired one, wireless or any other type | |
| INTF=enp8s0 | |
| ## DEFAULT_PROXY contains the HTTP_PROXY to be defined when INTF is connected | |
| DEFAULT_PROXY=http://127.0.0.1:3128/ |
| #coding=utf8 | |
| import itchat | |
| # tuling plugin can be get here: | |
| # https://github.com/littlecodersh/EasierLife/tree/master/Plugins/Tuling | |
| from tuling import get_response | |
| @itchat.msg_register('Text') | |
| def text_reply(msg): | |
| if u'作者' in msg['Text'] or u'主人' in msg['Text']: | |
| return u'你可以在这里了解他:https://github.com/littlecodersh' |
| # install dependencies | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential | |
| sudo apt-get install -y cmake | |
| sudo apt-get install -y libgtk2.0-dev | |
| sudo apt-get install -y pkg-config | |
| sudo apt-get install -y python-numpy python-dev | |
| sudo apt-get install -y libavcodec-dev libavformat-dev libswscale-dev | |
| sudo apt-get install -y libjpeg-dev libpng12-dev libtiff5-dev libjasper-dev | |
A personal diary of DataFrame munging over the years.
Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)
| # Note: ~/.ssh/environment should not be used, as it | |
| # already has a different purpose in SSH. | |
| env=~/.ssh/agent.env | |
| # Note: Don't bother checking SSH_AGENT_PID. It's not used | |
| # by SSH itself, and it might even be incorrect | |
| # (for example, when using agent-forwarding over SSH). | |
| agent_is_running() { |