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
@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));
@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" />
@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 &
@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
@pwlin
pwlin / gist:8a0d01e6428b7a96e2eb
Last active April 10, 2024 12:44
Android : add cert to system store
https://code.google.com/p/android/issues/detail?id=32696#c5
If you have a certificate that is not
trusted by Android, when you add it, it goes in the personal cert store.
When you add a cert in this personal cert store, the system requires a
higher security level to unlock the device. But if you manage to add your
cert to the system store then you don't have this requirement. Obviously,
root is required to add a certificate to the system store, but it is quiet
easy.
@itsoli
itsoli / nftables.conf
Last active January 19, 2023 14:43
nftables vpn config
#!/usr/bin/nft -f
define ext_if = ens3
define ext_ip = a.b.c.d
define vpn_if = ppp0
define vpn_ip = x.y.z.w/s
table inet filter {
chain input {
type filter hook input priority 0;
@mariotaku
mariotaku / README.md
Last active July 3, 2022 03:55
删除当前屏幕所有微博

删除所有微博

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

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

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

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
@lanceliao
lanceliao / 0-openwrt-auto-mount-readme.md
Last active November 26, 2022 08:58
Auto mount USB storage device by uuid on OpenWrt
  1. Install USB device support;
opkg install kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-storage e2fsprogs fdisk usbutils mount-utils block-mount kmod-fs-ext4 kmod-fs-vfat kmod-nls-utf-8 kmod-nls-cp437 kmod-nls-iso8859-1

reboot
  1. Install blkid, run opkg update && opkg install blkid;
  2. Copy block.sh to directory /lib/functions;
  3. Copy 10-mount and 20-swap to directory /etc/hotplug.d/block;
  4. That's it! run logread -f command then plug in a USB stick to test.