Skip to content

Instantly share code, notes, and snippets.

View Akagi201's full-sized avatar
🎯
Focusing

Bob Liu Akagi201

🎯
Focusing
View GitHub Profile
#!/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
#

python3

mkvirtualenv --python=`which python3` nameOfEnvironment

Install Python

$ brew install readline sqlite gdbm
#!/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
@Akagi201
Akagi201 / clients.md
Last active August 29, 2015 14:06 — forked from defunkt/clients.md

Gist Clients

Want to create a Gist from your editor, the command line, or the Services menu? Here's how.

Editor Support

WR703N OpenWrt 配置流程

下载安装

访问WR703N在OpenWrt的[Wiki页][wr703n-openwrt],然后在Flashing一节中找到下载链接:[squashfs-factory.bin][flash.bin],下载后别忘了[比对md5][md5sum]。[1]

进入路由器管理界面,出厂配置为http://192.168.1.1,用户名和密码均为admin,然后进入固件更新,选择下载的文件,然后更新。

@Akagi201
Akagi201 / web.go
Created July 11, 2014 12:32 — forked from lyricat/web.go
package main
import (
"log"
"net/http"
"os"
"strconv"
)
func main() {