mkvirtualenv --python=`which python3` nameOfEnvironment
Install Python
$ brew install readline sqlite gdbm
| # Timecode burn with ffmpeg | |
| # ffmpeg must be configured with --enable-libfreetype | |
| # box=1 - tells ffmpeg to draw a box around the text | |
| # boxcolor - format is 0xRRGGBB[AA] | |
| ffmpeg -i video.mov -vcodec libx264 -cmp 22 -vf "drawtext=fontfile=DroidSansMono.ttf: timecode='09\:57\:00\:00': r=23.976: x=(w-tw)/2: y=h-(2*lh): fontcolor=white: box=1: boxcolor=0x00000099" -y output.mov |
| CC=gcc | |
| CCFLAGS=-Wall | |
| LDFLAGS= | |
| SOURCES=$(wildcard *.c) | |
| OBJECTS=$(SOURCES:.c=.o) | |
| TARGET=des | |
| all: $(TARGET) | |
| $(TARGET): $(OBJECTS) |
| # Brian Smith's Super Duper Makefile | |
| # Change CC/CFLAGS/LDFLAGS to fit your needs | |
| # Directory format it searchs for: | |
| # src/ - have your .c/.cc/.cpp files in there | |
| # include/ - have your .h/.hpp files in there | |
| # build/ - empty folder for object files and the executable | |
| # CHANGE THESE TO FIT YOUR NEEDS | |
| CC = cc | |
| CFLAGS = -c -Wall -Iinclude/ |
| #!/usr/bin/env python | |
| #-*- coding: utf-8 -*- | |
| import sys | |
| import logging | |
| import datetime | |
| import requests | |
| import BeautifulSoup | |
| from requests.adapters import HTTPAdapter |
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| # | |
| # 1. 需要安装requests(pip3 install -U requests) | |
| # 2. 需要crontab配合以辅助完成自动签到 | |
| # 3. 如果想使用自己的当前登录的Cookies | |
| # 请在v2ex的浏览器控制台中输入 | |
| # $.getScript('//cdn.rawgit.com/js-cookie/js-cookie/master/src/js.cookie.js', function() { console.log(JSON.stringify(Cookies.get())); }) | |
| # 替换V2EXGetReward.cookies文件中的相应的Cookies | |
| # |
Here is a high level overview for what you need to do to get most of an Android environment setup and maintained.
Prerequisites (for Homebrew at a minimum, lots of other tools need these too):
xcode-select --install will prompt up a dialog)Install Homebrew:
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
| // Just before switching jobs: | |
| // Add one of these. | |
| // Preferably into the same commit where you do a large merge. | |
| // | |
| // This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
| // and then it quickly escalated into more and more evil suggestions. | |
| // I've tried to capture interesting suggestions here. | |
| // | |
| // Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
| // @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
Install portaudio using homebrew (or method of your choice)
brew install portaudiocreate $HOME/.pydistutils.cfg using the include and lib directories of your portaudio install:
[build_ext]
| #!/bin/bash | |
| # Run as root or sudo the commands that need it as you go. | |
| # brew version 0.9.5 | |
| # Mac OS X 10.10.1 | |
| # A little bit changed version of this: | |
| # http://stackoverflow.com/questions/19538118/osx-mavericks-bind-no-longer-installed-how-to-get-local-dns-server-working |