Skip to content

Instantly share code, notes, and snippets.

@wancw
wancw / aws-get-credentials.js
Created July 9, 2016 15:52 — forked from pahud/aws-get-credentials.js
AWS CredentialProviderChain example in aws-sdk of NodeJS
var AWS = require('aws-sdk');
var chain = new AWS.CredentialProviderChain();
var credentials
AWS.CredentialProviderChain.defaultProviders = [
function () { return new AWS.EnvironmentCredentials('AWS'); },
function () { return new AWS.EnvironmentCredentials('AMAZON'); },
function () { return new AWS.SharedIniFileCredentials({profile: 'my_profile_name'}); },
function () { return new AWS.EC2MetadataCredentials(); }
]
@wancw
wancw / fbfeed2csv.py
Created May 6, 2016 11:26 — forked from pofeng/fbfeed2csv.py
fbfeed2csv: a tool to download all posts from a user/group/page's facebook feed to a csv file
"""
modified for Python 2.7 and unicode
get your goup id at https://lookup-id.com/
get your acess token at https://developers.facebook.com/tools/explorer/
fork from
fbfeed2csv: a tool to download all posts from a user/group/page's facebook feed to a csv file
yuzawa-san
https://github.com/yuzawa-san
"""
@wancw
wancw / .gitmodules
Last active August 29, 2015 14:11 — forked from littleq0903/.gitmodules
[submodule "zsh-syntax-highlighting"]
path = zsh-syntax-highlighting
url = git://github.com/zsh-users/zsh-syntax-highlighting.git
import urllib, urllib2, json
'''
The ``FacebookTestUserManager`` module
======================================
Author: Weizhong Yang <zonble at gmail dot com>
A tool which helps to create and delete test account for Facebook.
import android.view.View;
import android.view.ViewGroup;
/**
* A {@link ViewGroup.OnHierarchyChangeListener hierarchy change listener} which recursively
* monitors an entire tree of views.
*/
public final class HierarchyTreeChangeListener implements ViewGroup.OnHierarchyChangeListener {
/**
* Wrap a regular {@link ViewGroup.OnHierarchyChangeListener hierarchy change listener} with one
@wancw
wancw / pr.md
Created March 28, 2013 02:11 — forked from piscisaureus/pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@wancw
wancw / LICENSE.txt
Created August 15, 2012 05:57 — forked from jed/LICENSE.txt
generate random UUIDs
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE