Skip to content

Instantly share code, notes, and snippets.

View Akagi201's full-sized avatar
🎯
Focusing

Bob Liu Akagi201

🎯
Focusing
View GitHub Profile
@marcinbunsch
marcinbunsch / codewall.badges.js
Created March 10, 2012 22:18
Coderwall - display missing badges
// How to use this:
// 1. Go to the desired profile page on coderwall, like http://coderwall.com/marcinbunsch
// 2. Paste this gist in the JS console
//
// You can also probably use this in greasemonkey and dot.js
//
// Also, it was tested in Chrome, Firefox and Safari, it probably will
// not work in IE, but I just don't care about it ;)
//
// UPDATE: Coderwall made changes to the site and I cannot retrieve the achievements, so they are hardcoded, taken from a cached version of the achievements page
@ninehills
ninehills / wr703n-openwrt.md
Last active December 9, 2022 13:37
WR703N OpenWrt 配置流程

WR703N OpenWrt 配置流程

下载安装

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

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

@reidransom
reidransom / gist:2630650
Created May 7, 2012 21:41
Timecode burn with ffmpeg
# 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 / Makefile.app
Last active October 11, 2015 16:58
Akagi201's Makefiles
#
# @file Makefile
#
# @author Akagi201
# @date 2014/03/20
#
# Linux Application Generic Makefile
#
# History:
# <author> <time> <version> <desc>

#Facebook Hacker Cup 2013

注册地址:http://www.facebook.com/hackercup/register

友情提示:国内访问facebook连接不好,需要使用网络软件


##各轮比赛时间

注:晋级规则皆为往年的

@minikomi
minikomi / editor.html
Last active November 11, 2021 10:16
my editor
data:text/html,
<style type="text/css">
#e {
position:absolute;
top:0;
right:0;
bottom:0;
left:0;
font-size:16px;
}
@fatih
fatih / set.go
Created August 11, 2013 21:05
Concurrent safe SET data structure in Go (Golang)
// A very simple example about how to use concurrent-safe SETs (using string as keys) in GO
package main
import (
"fmt"
"sync"
)
type Set struct {
m map[string]bool
@justinas
justinas / 1_singlehost.go
Last active November 29, 2023 11:41
Go middleware samples for my blog post. http://justinas.org/writing-http-middleware-in-go/
package main
import (
"net/http"
)
type SingleHost struct {
handler http.Handler
allowedHost string
}
@cr3ative
cr3ative / gist:8340001
Last active February 14, 2024 03:31
Drift HD Ghost - Technical Notes and Root

## Drift HD Ghost - Technical Notes and Root

Note: Please don't attempt anything here unless you are comfortable with the possibility of permanently damaging your camera. I also do not guarantee your camera is the same as mine - this is just for information and fun! It goes without saying that I take no responsibility for what you do with this information, and it will probably invalidate your warranty too.

It is reported that the firmware re-flash does not appear to disable the debug network on a Ghost S.

  • Most of this was found by simply running strings over publically available firmware and software, then searching around for anything interesting.
  • The camera runs on the Ambarella A5S chipset, which appears to run PrKERNEL (implementing uItron): http://www.esol.com/embedded/prkernelv4.html, then boots Linux as a process inside the uItron OS.
  • There's lots of references to BOSS in the firmware, presumably a codename for this chipset from Ambarella.
  • The code on the device-side is a very close im
@wen-long
wen-long / ss-redir 透明代理.md
Last active March 18, 2024 12:13
ss-redir 透明代理.md

##ss-redir 的 iptables 配置(透明代理)

透明代理指对客户端透明,客户端不需要进行任何设置就使用了网管设置的代理规则

创建 /etc/ss-redir.json 本地监听 7777 运行ss-redir -v -c /etc/ss-redir.json

iptables -t nat -N SHADOWSOCKS
# 在 nat 表中创建新链
iptables -t nat -A SHADOWSOCKS -p tcp --dport 23596 -j RETURN
# 23596 是 ss 代理服务器的端口,即远程 shadowsocks 服务器提供服务的端口,如果你有多个 ip 可用,但端口一致,就设置这个