Skip to content

Instantly share code, notes, and snippets.

@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 ???
*/
@nuomi
nuomi / 12306.user.js
Created January 12, 2012 03:47 — forked from quietlynn/12306.user.js
12306 Auto Query => A javascript snippet to help you book ticket
/*
12306 Auto Query => A javascript snippet to help you book tickets online.
Copyright (C) 2011-2012 Jingqin Lynn
Includes jQuery
Copyright 2011, John Resig
Dual licensed under the MIT or GPL Version 2 licenses.
http://jquery.org/license
Includes Sizzle.js