Skip to content

Instantly share code, notes, and snippets.

Connor Montgomery connor

Block or report user

Report or block connor

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@connor
connor / things.scpt
Created May 11, 2013
Alert'ing the open to-dos for the day in Things.app
View things.scpt
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
View jedmund.js
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) {
@connor
connor / rdio-prev.js
Created Jul 4, 2012
rdio script for chrome extension
View rdio-prev.js
var fake_prev_el = document.getElementById('fake_prev_el')
fake_prev_el.addEventListener('click', function() {
R.Services.Player.previous();
})
@connor
connor / info1.js
Created May 28, 2012
info method implementation
View info1.js
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) )
}
@connor
connor / search3.js
Created May 28, 2012
search method implementation with encodeURIComponent
View search3.js
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) )
})
}
@connor
connor / search2.js
Created May 28, 2012
search method implementation
View search2.js
var request = require('request')
exports.search = function( query, callback ) {
request("http://domai.nr/api/json/search?q=" + query, function(err, response, body) {
callback( JSON.parse(body) )
})
}
@connor
connor / search1.js
Created May 28, 2012
search method wrapper
View search1.js
var request = require('request')
exports.search = function( query, callback ) {
// more code will go here
}
@connor
connor / domainr_example.js
Created May 28, 2012
How to use the domai.nr node module
View domainr_example.js
var domainr = require("Domai.nr")
domainr.search("connor montgomery", function(responseFromDomainr) {
// do things with the responseFromDomainr object
})
domainr.info("cnnr.me", function(responseFromDomainr) {
@connor
connor / package.json
Created May 28, 2012
Domai.nr node module package.json file
View package.json
{
"name": "Domai.nr"
, "version": "1.0.0"
, "description": "A dead-simple way to utilize Domai.nr's JSON API"
, "keywords": [
"domainr"
, "domains"
, "search"
, "domain"
]
@connor
connor / dabblet.css
Created May 14, 2012
The first commented line is your dabblet’s title
View dabblet.css
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(42deg, #f06, yellow);
min-height: 100%;
You can’t perform that action at this time.