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
var startTimeInterval = setInterval(function(){ | |
jQuery.getJSON('http://api.corsonus.com/start.json?callback=?', function(data){ | |
var startTime = data.start_time; | |
if (startTime){ | |
clearInterval(startTimeInterval); | |
console.log('counting down...'); | |
var countdownInterval = setInterval(function(){ | |
// number of seconds | |
var remaining = Math.round((startTime - Date.now()) / 1000); | |
console.log('number of seconds remaining: ' + remaining); |
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
# run Apple's Software Update | |
# open XCode, then XCode(menu)->Preferences->Downloads tab and Install the Command Line Tools | |
brew update | |
brew doctor | |
# follow any instructions - mine are included below | |
brew tap homebrew/dupes | |
brew install autoconf automake apple-gcc42 | |
brew link apple-gcc42 # for some reason this didn't work in prior step |
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
DROP TABLE IF EXISTS profile_matches; | |
DROP TABLE IF EXISTS profiles; | |
-- the "nodes" | |
CREATE TABLE profiles ( | |
id SERIAL PRIMARY KEY, | |
service text, | |
username text | |
); |
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
git clone git://gist.github.com/3944262.git seven_langs_ruby | |
cd seven_langs_ruby | |
gem install gli -v 1.6.0 | |
gem install showoff | |
showoff serve | |
open "http://localhost:9090" |
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
➜ jsonp git:(master) ✗ jitsu deploy | |
info: Welcome to Nodejitsu aidanfeldman | |
info: jitsu v0.10.5, node v0.8.11 | |
info: It worked if it ends with Nodejitsu ok | |
info: Executing command deploy | |
info: Analyzing application dependencies in server.js | |
debug: { method: 'GET', | |
debug: uri: 'http://api.nodejitsu.com/apps/aidanfeldman/jsonp', | |
debug: headers: | |
debug: { Authorization: 'Basic YWlkYW5mZWxkbWFuOmN1YmJpZTE=', |
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
# We had introduced a bug that was causing user registration errors in Rails for certain email addresses. | |
# Fetch the list of unique emails that had failed registration (that produced a particular exception). | |
require 'open-uri' | |
require 'nokogiri' | |
require 'set' | |
AUTH_TOKEN = 'XXX' | |
ERROR_ID = '54425478' |
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
{ | |
"multiquark": { | |
"quarks": [ | |
{ | |
"background_picture": { | |
"id": "5112ac3d94b23b743c00001e" | |
}, | |
"text": "First Page", | |
"title": "stuff" | |
}, |
This list has been superseded by Public APIs. Check there for APIs with Auth: No
, HTTPS
and CORS
Yes
.
List of data APIs that require no server-side auth or private credentials, and are thus good for small browser-only JS projects.
- 3taps (information)
- Adobe Creative SDK (image editing)
- App.net
- Bing Maps
I've seen waaaay too many people modifying their Wordpress sites live, which is fragile because when (not "if") you break something, your visitors will see it. Here are steps for setting up a copy of your site locally, so you can muck around without worry. These instructions are for Wordpress sites hosted on GoDaddy specifically, but they should be fairly easy to interpret for other providers.
- Log into GoDaddy, and go to "My Account".
- Under "Web Hosting", click Launch next to your site's name.
- Under "Databases", click "MySQL".
- Next to your database name, click "Actions"->"Back Up".
- Log into FTP, and under
/_db_backups/
you'll see a new*.sql
file. - Rename this to be
mydb-YYMMDD.sql
format (e.g.superwordpress-130220.sql
).