Skip to content

Instantly share code, notes, and snippets.

# Android SDK setup
## Install Java
```bash
sudo apt-get update
sudo dpkg --add-architecture i386
sudo apt-get install libbz2-1.0:i386
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1
sudo apt-get install openjdk-8-jdk openjdk-8-jre
@yoga1290
yoga1290 / DownloadYTVideo.js
Created July 11, 2016 18:13
Youtube video downloader script
// go to the youtube video page using iPhone as user-agent and run the following script:
var xhr=new XMLHttpRequest();
xhr.open("GET",location.href,true);
xhr.onload=function(){
var r=xhr.responseText;
r=r.substring(r.indexOf('url_encoded_fmt_stream_map'),r.length);
r=r.substring(r.indexOf('url=http')+4,r.length);
r=r.split('url=');
location.href=
<?php
//put in your nation slug and token
$url ="https://<your slug>.nationbuilder.com/api/v1/people?access_token=<token>";
$data = array(
'person' => array(
'email' => "[email protected]",
'last_name' => "Bob",
'first_name' => "Smith",
@robflaherty
robflaherty / csv-to-json.php
Created September 1, 2011 02:26
Convert CSV to JSON
<?php
/*
* Converts CSV to JSON
* Example uses Google Spreadsheet CSV feed
* csvToArray function I think I found on php.net
*/
header('Content-type: application/json');
// Set your CSV feed