- United States on github They have a great US module that has state abbrevs, names, etc. O'Reilly article about the project
- The State Decoded
- Legislative Documents in XML at the United States House of Representatives
- US Government Web Services and XML Data Sources
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<link href='https://fonts.googleapis.com/css?family=Open+Sans+Condensed:300' rel='stylesheet' type='text/css'> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<style> | |
.label { | |
font-size: 2em; |
This file contains hidden or 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
# mongod.conf | |
# for documentation of all options, see: | |
# http://docs.mongodb.org/manual/reference/configuration-options/ | |
# Where and how to store data. | |
storage: | |
dbPath: "/var/lib/mongodb" | |
journal: | |
enabled: true |
This file contains hidden or 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
mongod --smallfiles --oplogSize 16 --nojournal |
This file contains hidden or 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 hidden or 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
%for thing in things: | |
<li>{{thing}}</li> | |
%end |
This file contains hidden or 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
public class EnumStringExample { | |
public static enum DAYS_OF_THE_WEEK { | |
MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY; | |
public String toString() { | |
String plainName = name().toString(); | |
String fancy = plainName.charAt(0) | |
+ plainName.substring(1).toLowerCase(); |
This file contains hidden or 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
config = { _id: "m101", members:[ | |
{ _id : 0, host : "localhost:27017"}, | |
{ _id : 1, host : "localhost:27018"}, | |
{ _id : 2, host : "localhost:27019"} ] | |
}; | |
rs.initiate(config); | |
rs.status(); |
This file contains hidden or 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
mkdir \data\rs1 \data\rs2 \data\rs3 | |
start mongod --replSet m101 --logpath "1.log" --dbpath \data\rs1 --port 27017 --smallfiles --oplogSize 64 | |
start mongod --replSet m101 --logpath "2.log" --dbpath \data\rs2 --port 27018 --smallfiles --oplogSize 64 | |
start mongod --replSet m101 --logpath "3.log" --dbpath \data\rs3 --port 27019 --smallfiles --oplogSize 64 |
This file contains hidden or 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 bottle | |
@bottle.route('/') | |
def home_page(): | |
return "Hello World\n" | |
@bottle.route('/testpage') | |
def test_page(): | |
return "this is a test page" |