subconv for self use
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pushover_open_client import Client, Message | |
class Pushover: | |
def __init__(self): | |
self.client = Client("creds.json") | |
def messageCallback(self, msgList): | |
if msgList: | |
for msg in msgList: | |
self.client.deleteMessages(msgList[-1].id) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MySQL to Google Spreadsheet By Pradeep Bheron | |
// Support and contact at pradeepbheron.com | |
function myMySQLFetchData() { | |
var conn = Jdbc.getConnection('jdbc:mysql://127.0.0.1:3306/employee_db', 'username', 'pass'); // Change it as per your database credentials | |
var stmt = conn.createStatement(); | |
var start = new Date(); // Get script starting time | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Backup the current vps 备份当前vps | |
1. Clean Arch system 清理系统 | |
pacman -Scc | |
2. Create an excluded file to exclude certain dirs 建立一个需要排除的目录的文件,这些文件不必要备份,新系统会自动生成 | |
cat /root/backup/exclude.txt | |
/tmp/* | |
/root/backup/* | |
/proc | |
/dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#-*- coding: utf-8 -*- | |
''' | |
Copyleft (c) 2016 breakwa11 | |
https://github.com/breakwa11/shadowsocks-rss | |
''' | |
import logging | |
import socket |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"flag" | |
"io" | |
"log" | |
"net" | |
"net/http" | |
"os" |
I hereby claim:
- I am goxofy on github.
- I am tink (https://keybase.io/tink) on keybase.
- I have a public key ASBSEL23CUy6lG9qCv2_jZ3ccsJ5ZsUGgv6LucW2EfrFWwo
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
server_IP=123.45.67.89 | |
[ -r chnroute.txt ] || curl 'http://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest' | grep ipv4 | grep CN | awk -F\| '{ printf("%s/%d\n", $4, 32-log($5)/log(2)) }' > chnroute.txt | |
sudo iptables -t nat -N SHADOWSOCKS | |
sudo iptables -t nat -A PREROUTING -s 10.8.0.0/24 -p tcp -j SHADOWSOCKS | |
sudo iptables -t nat -A PREROUTING -s 10.8.0.0/24 -p udp -j SHADOWSOCKS | |
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE |
NewerOlder