This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
| # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. | |
| # Initialization code that may require console input (password prompts, [y/n] | |
| # confirmations, etc.) must go above this block; everything else may go below. | |
| if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then | |
| source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" | |
| fi | |
| # If you come from bash you might have to change your $PATH. | |
| # export PATH=$HOME/bin:/usr/local/bin:$PATH |
| input[type="text"], textarea { | |
| outline: none; | |
| box-shadow:none !important; | |
| border:1px solid #ccc !important; | |
| } |
| # Tell system when Xcode utilities live: | |
| sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer | |
| # Set "opendiff" as the default mergetool globally: | |
| git config --global merge.tool opendiff |
| gang@debian:~$ sudo apt-get install netcat-openbsd | |
| gang@debian:~$ cat /usr/local/bin/git-proxy-wrapper | |
| #!/bin/bash | |
| nc -xlocalhost:1080 -X5 $* | |
| gang@debian:~$ export GIT_PROXY_COMMAND=/usr/local/bin/git-proxy-wrapper |
| 首先你需要一个不怕dns污染的http代理,比如连接到私人VPS的ssh tunnel+privoxy之类… | |
| 以下例子里我都使用10.8.0.1:8118作为代理服务器。 | |
| ## 让普通命令行工具使用代理 | |
| 可以在~/.profile或~/.bashrc里加上: | |
| ``` | |
| enable_proxy() { | |
| export http_proxy="10.8.0.1:8118" |
| import os | |
| import ycm_core | |
| from clang_helpers import PrepareClangFlags | |
| # Set this to the absolute path to the folder (NOT the file!) containing the | |
| # compile_commands.json file to use that instead of 'flags'. See here for | |
| # more details: http://clang.llvm.org/docs/JSONCompilationDatabase.html | |
| # Most projects will NOT need to set this to anything; you can just change the | |
| # 'flags' list of compilation flags. Notice that YCM itself uses that approach. | |
| compilation_database_folder = '' |
| #!/bin/bash | |
| export FOO=100 | |
| python - <<END | |
| import os | |
| print "foo:", os.environ['FOO'] | |
| END |
| #! /bin/bash | |
| MYSQL="/opt/local/etc/LaunchDaemons/org.macports.mysql5/mysql5.wrapper" | |
| NGINX="/opt/local/sbin/nginx" | |
| PHPFPM="/opt/local/sbin/php-fpm" | |
| PIDPATH="/opt/local/var/run" | |
| MEMCACHED="/opt/local/bin/memcached -m 24 -P /opt/local/var/run/memcached.pid -u root" | |
| if [ $1 = "start" ]; then | |
| sudo $MYSQL start | |
| echo "Starting php-fpm ..." |