See it in action on an Android 2.2 (API 8) emulator :
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
import android.app.Application; | |
import android.content.ComponentName; | |
import android.content.Context; | |
import android.content.pm.PackageManager; | |
import krishan.dhancha.controller.receiver.NetworkStateReceiver; | |
import timber.log.Timber; | |
/** | |
* Created by Krishan on 16-Aug-14. | |
*/ |
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 python3 | |
# Dependency: pip3 install twitter | |
import twitter | |
# Go to http://apps.twitter.com/, create an app, and fill in these values: | |
consumer_key = 'www' | |
consumer_secret = 'xxx' | |
access_token = 'yyy' | |
access_token_secret = 'zzz' |
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
if [ ! -e ~/.antigen/source/antigen.zsh ];then | |
mkdir ~/.antigen | |
git clone https://github.com/zsh-users/antigen.git ~/.antigen/source | |
fi; | |
if [ ! -e "$HOME/.scm_breeze/scm_breeze.sh" ];then | |
git clone git://github.com/scmbreeze/scm_breeze.git ~/.scm_breeze | |
fi; | |
source ~/.antigen/source/antigen.zsh |
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
<?php | |
//sharing this logic because twitter doesn't give you and end point to get mutual relationships (uses zend mvc framework for requests but it is easy enough to use something else to make the API requests) | |
//note: $this->source variable is a standard object that holds access token and user information for the user doing the requests | |
$cursor = -1; //initial position for twitter API friends and follower endpoint (important for users with more then 5000 followers/friends) | |
do { | |
//get the first 5000 following ids |
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
<?php | |
require "vendor/autoload.php"; | |
use Abraham\TwitterOAuth\TwitterOAuth; | |
// You can get all these via https://dev.twitter.com/ | |
$consumer_key = ""; | |
$consumer_secret = ""; | |
$access_token = ""; | |
$access_token_secret = ""; | |
$user_id = 0; // Twitter user ID |
I hereby claim:
- I am nekofar on github.
- I am nekofar (https://keybase.io/nekofar) on keybase.
- I have a public key ASA3UEeJhPbzGzW3y3YncaCRhMWqYSemlDT78_kjUWn1QQo
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
import twitter | |
# Twitter username | |
SCREEN_NAME = 'VVVVVVVV' | |
# Consumer API keys | |
CONSUMER_KEY = 'WWWWWWWW' | |
CONSUMER_SECRET = 'XXXXXXXX' | |
# Access token & access token secret |
OlderNewer