Skip to content

Instantly share code, notes, and snippets.

View marks's full-sized avatar

Mark Silverberg marks

View GitHub Profile
@marks
marks / states.geojson
Created January 20, 2016 20:13 — forked from mapsam/states.geojson
US States GeoJSON from NaturalEarthData
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@marks
marks / 0_reuse_code.js
Created January 20, 2016 18:44
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@marks
marks / chicago-crimes.v2.json
Last active January 17, 2016 20:39 — forked from timwis/chicago-crimes.v2.json
Chicago crime incidents VizWit configuration
{
"version": "2",
"header": {
"title": "Crime Incidents in Chicago",
"description": "This dataset reflects reported incidents of crime (with the exception of murders where data exists for each victim) that occurred in the City of Chicago from 2001 to present, minus the most recent seven days. Data is extracted from the Chicago Police Department's CLEAR (Citizen Law Enforcement Analysis and Reporting) system. In order to protect the privacy of crime victims, addresses are shown at the block level only and specific locations are not identified.",
"navigation": [{
"label": "Download",
"url": "https://data.cityofchicago.org/api/views/ijzp-q8t2/rows.csv?accessType=DOWNLOAD&bom=true"
}]
},
@marks
marks / README.md
Last active August 29, 2015 14:25 — forked from jefffriesen/README.md
US Zip Codes
@marks
marks / test.rb
Created July 10, 2014 00:45 — forked from franklsf95/test.rb
# In the following code, the two gsub's have different outcomes.
ver = 9999
str = "\t<key>CFBundleDevelopmentRegion</key>\n\t<string>en</string>\n\t<key>CFBundleVersion</key>\n\t<string>0.1.190</string>\n\t<key>AppID</key>\n\t<string>000000000000000</string>"
puts str.gsub /(CFBundleVersion<\/key>\n\t.*\.).*(<\/string>)/, "#{$1}#{ver}#{$2}"
puts '--------'
puts str.gsub /(CFBundleVersion<\/key>\n\t.*\.).*(<\/string>)/, "#{$1}#{ver}#{$2}"
@marks
marks / glass.html
Created March 30, 2014 02:06 — forked from drGrove/glass.html
[wearscript] Wearscript is Awesome!
<html style="width:100%; height:100%; overflow:hidden" data-test>
<head>
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.0/zepto.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>-->
</head>
<body style="width:100%; height:100%; overflow:hidden; margin:0">
<canvas id="canvas" width="640" height="360" style="display:block"></canvas>
<script>
WS.log('Welcome to WearScript');
WS.say('Wearscript is awesome');
@marks
marks / glass.html
Created March 30, 2014 02:02 — forked from bwhite/glass.html
[wearscript] Scan a QR code with Glass and have links open in tabs on your phone/laptop
<html style="width:100%; height:100%; overflow:hidden">
<body style="width:100%; height:100%; overflow:hidden; margin:0">
<script>
function qr(data, format) {
WS.publish('urlopen', atob(data));
}
function server() {
WS.say('Scan a QR Code');
WS.qr('qr');
}
@marks
marks / get_tweets.rb
Created March 26, 2012 16:22 — forked from eric-wood/get_tweets.rb
Load real-time tweets into ActiveRecord (strips out location data)
#!/usr/bin/env ruby
require 'tweetstream'
APP_PATH = File.expand_path('../../config/application', __FILE__)
require File.expand_path('../../config/boot', __FILE__)
require APP_PATH
Rails.application.require_environment!
TweetStream.configure do |config|
config.consumer_key = 'redacted'
@marks
marks / personal_ivr.js
Created March 22, 2012 22:19 — forked from anonymous/inbound code tropo
Tropo code for "hareem" on IRC
answer();
// if its me, ask me for a number to call
if(currentCall.callerID == "_your_phone_number_" || currentCall.callerID == "your_sip_url_"){
var result = ask("Enter the 10 digit phone number now.", {
  choices: "[10 DIGITS]",
  attempts: 3
});
transfer("tel:+1"+result.value,{
callerID : "111",
<?php
require_once 'lib/limonade.php';
function configure()
{
option('session', 'my_session_name'); // enable with a specific session name
}
dispatch('/', 'example_index');
function example_index()