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
// NOTE: I added the .js extension to this gist so it would have syntax highlighting. This file should have NO file extension | |
{ | |
// Settings | |
"passfail" : false, // Stop on first error. | |
"maxerr" : 100, // Maximum error before stopping. | |
// Predefined globals whom JSHint will ignore. | |
"browser" : true, // Standard browser globals e.g. `window`, `document`. |
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
# WHAT IS THIS? | |
# This is a pre-commit hook that runs your js code against jshint before committing. | |
# If you ever want to make a commit without it running this, simply run: | |
# git commit -n | |
# INSTRUCTIONS: | |
# 1. Install jshint-runner: npm install -g jshint-runner | |
# 2. In your git project, rename .git/hooks/pre-commit.sample to .git/hooks/pre-commit | |
# 3. Create a .jshintrc file in ~/. This is simply an object with the options you want. See mine here: https://gist.github.com/1597131 | |
# 4. Paste the code below line 14 in that ~/.jshintrc file |
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
tell application "Things" | |
repeat with td in to dos of list "Today" | |
set tdName to the name of td | |
set tdStatus to the status of td | |
if tdStatus = open then | |
display dialog tdName | |
end if |
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
function getUser(username) { | |
var config = Instagram.config; | |
var url = config.api_host + "/v1/users/" + searchUsers(username, _usernameToId) + "/?access_token=" + config.access_token + "&callback=?"; | |
$.getJSON(url, function(data) { | |
console.log(data); | |
}); | |
} | |
function searchUsers(q, callback) { |
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 fake_prev_el = document.getElementById('fake_prev_el') | |
fake_prev_el.addEventListener('click', function() { | |
R.Services.Player.previous(); | |
}) |
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 request = require('request') | |
exports.search = function( query, callback ) { | |
request("http://domai.nr/api/json/search?q=" + encodeURIComponent(query), function(err, response, body) { | |
callback( JSON.parse(body) ) | |
}) | |
} |
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 request = require('request') | |
exports.search = function( query, callback ) { | |
// more code will go here | |
} |
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 domainr = require("Domai.nr") | |
domainr.search("connor montgomery", function(responseFromDomainr) { | |
// do things with the responseFromDomainr object | |
}) | |
domainr.info("cnnr.me", function(responseFromDomainr) { |
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
exports.info = function(query, callback) { | |
request("http://domai.nr/api/json/info?q=" + query, function(err, response, body) { | |
if (response.statusCode === 200) { | |
callback( JSON.parse(body) ) | |
} else { | |
throw new Error("Sorry, there was an error. Make sure " + query + " is a valid domain to look up. Here's the response I got:\n" + JSON.stringify(response) ) | |
} |
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
{ | |
"name": "Domai.nr" | |
, "version": "1.0.0" | |
, "description": "A dead-simple way to utilize Domai.nr's JSON API" | |
, "keywords": [ | |
"domainr" | |
, "domains" | |
, "search" | |
, "domain" | |
] |
NewerOlder