Skip to content

Instantly share code, notes, and snippets.

View sirvon's full-sized avatar

SirVon Thomas sirvon

  • XNA Inc.
  • California, USA
View GitHub Profile
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
import android.app.Activity;
import android.app.ProgressDialog;
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
import android.widget.ArrayAdapter;
import android.widget.ListView;
//note that it's not this name anymore, update it!
import dme.forecastiolib.FIOCurrently;
@sirvon
sirvon / build.gradle
Last active August 29, 2015 14:08 — forked from menny/build.gradle
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.9.+'
classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.9.+'
}
}
[
{name: 'Afghanistan', code: 'AF'},
{name: 'Åland Islands', code: 'AX'},
{name: 'Albania', code: 'AL'},
{name: 'Algeria', code: 'DZ'},
{name: 'American Samoa', code: 'AS'},
{name: 'AndorrA', code: 'AD'},
{name: 'Angola', code: 'AO'},
{name: 'Anguilla', code: 'AI'},
{name: 'Antarctica', code: 'AQ'},
@sirvon
sirvon / gist:8754348
Created February 1, 2014 16:12
geotrigger snippet - savelocation to sharedpreferences
@Override
public void onLocationUpdate(Location loc, boolean isOnDemand) {
// Called with the GeotriggerService obtains a new location update from
// Android's native location services. The isOnDemand parameter lets you
// determine if this location update was a result of calling
// GeotriggerService.requestOnDemandUpdate()
Toast.makeText(this, "Location Update Received!",
Toast.LENGTH_SHORT).show();
Log.d(TAG, String.format("Location update received: (%f, %f)",
loc.getLatitude(), loc.getLongitude()));
curl -u <username_here> https://api.github.com/user/repos -d '{"name":"curltest", "description": "testing description"}'
=> Enter passphrase:
// Example test case(below):
cd <local_repo_dir_path>
mkdir curltest
cd curltest
git init
touch curltest.txt
subl& culrtest.txt