mkvirtualenv --python=`which python3` nameOfEnvironment
Install Python
$ brew install readline sqlite gdbm
#!/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 | |
# |
#!/usr/bin/env python | |
#-*- coding: utf-8 -*- | |
import sys | |
import logging | |
import datetime | |
import requests | |
import BeautifulSoup | |
from requests.adapters import HTTPAdapter |
# 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/ |
CC=gcc | |
CCFLAGS=-Wall | |
LDFLAGS= | |
SOURCES=$(wildcard *.c) | |
OBJECTS=$(SOURCES:.c=.o) | |
TARGET=des | |
all: $(TARGET) | |
$(TARGET): $(OBJECTS) |
# 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 |
package main | |
import ( | |
"log" | |
"net/http" | |
"os" | |
"strconv" | |
) | |
func main() { |