Skip to content

Instantly share code, notes, and snippets.

@nuomi
nuomi / clash
Last active January 29, 2023 13:07
sample data
port: 7890
socks-port: 7891
allow-lan: true
mode: Rule
log-level: info
external-controller: :9090
proxies:
- {name: 🇫🇷 法国(欢迎订阅Youtube破解资源君), server: 149.202.82.172, port: 5003, type: ss, cipher: aes-256-gcm, password: g5MeD6Ft3CWlJId, udp: true}
- {name: 🇨🇦 加拿大(欢迎订阅Youtube破解资源君), server: 217.138.200.242, port: 8389, type: ss, cipher: chacha20-ietf-poly1305, password: EGTHtnGhcnggx5yBYSqS, udp: true}
- {name: 🇨🇦 加拿大(欢迎订阅Youtube破解资源君) 2, server: 198.57.27.188, port: 2375, type: ss, cipher: aes-256-gcm, password: faBAoD54k87UJG7, udp: true}
@nuomi
nuomi / Documentation.md
Created April 28, 2016 14:37 — forked from KartikTalwar/Documentation.md
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs
@nuomi
nuomi / top_1000_handles
Last active September 13, 2015 08:07
top 1000 twitter handles
katyperry
justinbieber
ladygaga
BarackObama
taylorswift13
YouTube
britneyspears
rihanna
instagram
jtimberlake
@nuomi
nuomi / gist:2add2b7bd74b0a26c2bf
Last active September 13, 2015 08:07 — forked from jonw2000/gist:cb4bf5663a57ee504aa6
Top 1000 Most Followed @newsycombinator
Rank | Popularity | Followers | Friends | Name (@twitter)
--- | --- | --- | --- | ---
1 | 90712 | 96862 | 1 | Hacker News ([@newsycombinator](https://twitter.com/newsycombinator))
2 | 44662 | 4817719 | 669 | TechCrunch ([@TechCrunch](https://twitter.com/TechCrunch))
3 | 37818 | 20816944 | 166 | Bill Gates ([@BillGates](https://twitter.com/BillGates))
4 | 32030 | 10456263 | 437 | Google ([@google](https://twitter.com/google))
5 | 31454 | 4214811 | 194 | WIRED ([@WIRED](https://twitter.com/WIRED))
6 | 30745 | 1797099 | 44 | Elon Musk ([@elonmusk](https://twitter.com/elonmusk))
7 | 29658 | 5110615 | 2799 | Mashable ([@mashable](https://twitter.com/mashable))
8 | 28988 | 232056 | 139 | Paul Graham ([@paulg](https://twitter.com/paulg))
@nuomi
nuomi / gist:34e1f8255153279ed9e1
Last active September 13, 2015 07:58
Python Scraping

itunes have a rss feed of their top songs, I would use this to get the daily top 100. This is the feed you want https://itunes.apple.com/gb/rss/topsongs/limit=100/json and this is the generator https://rss.itunes.apple.com/gb/.

{"feed":{"author":{"name":{"label":"iTunes Store"}, "uri":{"label":"http://www.apple.com/uk/itunes/"}}, "entry":{"im:name":{"label":"Wrecking Ball"}, "im:image":[
{"label":"http://a166.phobos.apple.com/us/r30/Music/v4/7f/c5/85/7fc58500-1dd8-6581-2524-c07870b7defa/886444193757.55x55-70.jpg", "attributes":{"height":"55"}}, 
{"label":"http://a888.phobos.apple.com/us/r30/Music/v4/7f/c5/85/7fc58500-1dd8-6581-2524-c07870b7defa/886444193757.60x60-50.jpg", "attributes":{"height":"60"}}, 
{"label":"http://a231.phobos.apple.com/us/r30/Music/v4/7f/c5/85/7fc58500-1dd8-6581-2524-c07870b7defa/886444193757.170x170-75.jpg", "attributes":{"height":"170"}}], "im:collection":{"im:name":{"label":"Wrecking Ball - Single"}, "link":{"attributes":{"rel":"alternate", "type":"text/html", "href":"https:
@nuomi
nuomi / android_top_games.py
Last active September 13, 2015 07:57 — forked from alagappanr/android_top_games.py
A simple python script that scrapes the Android Top Charts page to get the list of top 20 games in each of the "Top Free", "Top Paid" and "Top Grossing" categories and write it into a file as json. Repeats the process every 1 hour.
#!/usr/bin/env python
"""
# Program to ping the Android Top Charts page every once
# in a while to get the top games and store it into a
# JSON file for processing later
# Crude version of code. Requires cleaning up.
# Author: Alagappan Ramu
# Version: 0.1
@nuomi
nuomi / rating.sh
Last active September 13, 2015 07:54 — forked from lmandel/rating.sh
Scrape ratings data from Google Play
#!/bin/sh
DEBUG=false
DATE=`date +%Y%m%d`
PLAY_URL=https://play.google.com/store/apps/details?id=
PRODUCT=$1
#if [ $1 == 'firefox' ]
#then
# PRODUCT=org.mozilla.firefox
#fi
/**
* 微信公众平台 fakeid 爬取
* Usage: casperjs test.js [email protected] password
* # phantomjs --version
* 1.9.7
* # casperjs --version
* 1.1.0-beta3
--ignore-ssl-errors=yes ???
*/
public static String getDeviceInfo(Context context) {
try{
org.json.JSONObject json = new org.json.JSONObject();
android.telephony.TelephonyManager tm = (android.telephony.TelephonyManager) context
.getSystemService(Context.TELEPHONY_SERVICE);
String device_id = tm.getDeviceId();
android.net.wifi.WifiManager wifi = (android.net.wifi.WifiManager) context.getSystemService(Context.WIFI_SERVICE);
@nuomi
nuomi / gist:5f280f7778d3f6168e62
Created July 31, 2014 08:13
capture http GET and POST with tcpdump
tcpdump -XvvennSs 0 'tcp[20:2]=0x504f or tcp[20:2]=0x4854 '