Skip to content

Instantly share code, notes, and snippets.

View lixingcong's full-sized avatar
😂
Face With Tears of Joy...

Lixingcong lixingcong

😂
Face With Tears of Joy...
View GitHub Profile
@pdp7
pdp7 / fbtft-rpi2-ubuntu-kernel-3.18.md
Last active August 8, 2016 21:33
Linux kernel 3.18.0-29-rpi2 with fbtft modules for Ubuntu 14.04 on Raspberry Pi 2

OpenWrt BarrierBreaker 14.07-rc3 手记

1 外置存储 - ExtRoot

1.1 USB HDD 分区

安装依赖和工具包:
@JingwenTian
JingwenTian / twitter-proxy.md
Created October 4, 2014 10:01
nginx反代twitter完整镜像 (原文:http://jude.me/2014/10/04/twitter-mirror-2.html

示例

需要注意的几点

  • content-security-policy这个header要去掉,或者重写进你自己的域名,不然有些浏览器不会加载外部的元素
  • 使用proxy_cookie_domain替换cookies的作用域。twitter返回的cookies作用域是.twitter.com,也就是twitter.com的所有二级域名都可以调用,为使用者的安全考虑建议替换成反代所使用的二级域名比如tt.jude.me
@heynemann
heynemann / gist:3341234
Created August 13, 2012 14:30
nginx conf for thumbor
upstream thumborbe {
server thumbor.myhost.com:8090 ;
server thumbor.myhost.com:8091 ;
server thumbor.myhost.com:8092 ;
server thumbor.myhost.com:8093 ;
server thumbor.myhost.com:8094 ;
server thumbor.myhost.com:8095 ;
}
location ~* "^/.{28}/.*(jpg|jpeg|gif|png)(#.*)?$" {
@hmic
hmic / httpPostData.php
Last active September 24, 2021 08:38
PHP post data and file - multipart-form-data
<?php
/*
* use like:
* httpPostDataFile(
* 'https://www.google.com/search', // the url to post to, optionally including get parameters like: ?this=that&here=there
* [
* 'q' => 'php http upload file', // post data like: <input name="q" value="php http upload file" />
* ...
* ], [
* 'image' => [ // the input name used like: <input name="image" type="file" />
@lotem
lotem / luna_pinyin.custom.yaml
Last active April 16, 2022 08:02
導入碼表示例
# luna_pinyin.custom.yaml
# 修改字典名爲 luna_pinyin.kunki
# 其對應的用戶詞典名取句點之前部分即 luna_pinyin
patch:
translator/dictionary: luna_pinyin.kunki
@mariotaku
mariotaku / README.md
Last active July 3, 2022 03:55
删除当前屏幕所有微博

删除所有微博

在Chrome Dev Tools中粘贴代码到Console,就可以删除当前屏幕所有微博。经过测试一万条微博大约需要10小时的半人工操作。

每批删除大概一分钟,最多50条。

如果遇到微博的Rate limit(提示操作过快),稍等三五分钟再试即可。

@ihciah
ihciah / tasker.js
Created September 19, 2018 05:46
Forward SMS using Tasker
var SMS = global('SMSRB');
var SENDER = global('SMSRF');
var SMSCONTENT = SMS + "\nSender: " + SENDER + "\nFrom Mobile"
var url = "https://xxxxxxxx/sendMessage?chat_id=0000000";
var xhttp = new XMLHttpRequest();
xhttp.open("POST", url, false);
xhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
xhttp.send("text="+encodeURIComponent(SMSCONTENT));
@iwek
iwek / traceroute.php
Last active December 3, 2022 14:03
PHP Script for Traceroute Pingdom API
<?php
$host = $_GET["host"];
if (empty($host)) {
echo 'Please provide host';
} else {
//create the url for API call
$url = "https://api.pingdom.com/api/2.0/traceroute?host=".$host;
@madeye
madeye / iperf.sh
Created February 3, 2017 01:29
Bandwidth test for shadowsocks
#!/bin/bash
method=$1
ss-tunnel -k test -m $method -l 8387 -L 127.0.0.1:8388 -s 127.0.0.1 -p 8389 &
ss_tunnel_pid=$!
ss-server -k test -m $method -s 127.0.0.1 -p 8389 &
ss_server_pid=$!
iperf -s -p 8388 &