Skip to content

Instantly share code, notes, and snippets.

Action:
android.intent.action.VIEW
ActivityClass:
com.google.android.maps.MapsActivity
ActivityPackage:
com.google.android.apps.maps
import java.util.Random;
public class Vampire
{
public String Name;
public int Health;
public Vampire Bite(Human human) {
System.out.println(Name + " just bit " + human.Name);
String newName = human.Name + "cula";
@joeybrown
joeybrown / Pig.java
Last active May 4, 2018 05:23
PIG Dice Game
import java.util.Scanner;
import java.util.Random;
public class Pig
{
private static int Player1 = 1;
private static int Player2 = 2;
private static int WinPoints = 21;
private int PlayerTurn;
@joeybrown
joeybrown / Mac hosts file location
Created November 12, 2014 03:07
Mac hosts file location
/private/etc/hosts
congress_payload = {'latitude': latitude, 'longitude': longitude, 'apikey': settings.SUNLIGHT_API_KEY}
congress_response = requests.get(
'https://congress.api.sunlightfoundation.com/legislators/locate',
params=congress_payload
)
nginx: https://gist.github.com/michiel/1064640
django: https://github.com/ottoyiu/django-cors-headers
https://gist.github.com/isaacs/579814
http://calvinx.com/2013/07/11/python-virtualenv-with-node-environment-via-nodeenv/
========================================================
Deployment information for http://myrepresentatives.com.
========================================================
Note::
Much of this was derived from @jacobian's Django deployment workshop:
http://github.com/jacobian/django-deployment-workshop/blob/master/notes/pycon-2010-script.txt
Possible Deployment Options::
1. Run virtual domains on nginx and pass domain header, pointing to 1 instance of apache w/ virtual domains as usual
2. Run virtual domains on nginx, w/ multiple instance of apache (on different ports)