Skip to content

Instantly share code, notes, and snippets.

View landongn's full-sized avatar
🎧
Code Yoter

Landon Noss landongn

🎧
Code Yoter
View GitHub Profile
@landongn
landongn / hipchat_bot.js
Created January 17, 2012 22:48 — forked from powdahound/hipchat_bot.js
Basic XMPP bot example for HipChat using node.js
// Basic XMPP bot example for HipChat using node.js
// To use:
// 1. Set config variables
// 2. Run `node hipchat_bot.js`
// 3. Send a message like "!weather 94085" in the room with the bot
var request = require('request'); // github.com/mikeal/request
var sys = require('sys');
var util = require('util');
up_vote: function(data){
data.type="upvote";
console.log(has_voted, 'has_voted, line 87');
mdb.collection('kudos_bank', function(err, coll){
coll.find({'target_hash':data.target_hash, 'id':data.id}, function(err, cursor){
cursor.toArray(function(err, docs){
console.log(docs);
if (docs.length == 0) {
@landongn
landongn / gist:2516659
Created April 28, 2012 06:58
server/collab.js
//#data
Content = new Meteor.Collection('content');
Topics = new Meteor.Collection('topics');
Session.set('is_editing', false);
Session.set('username', null);
Session.set('active_id', 0);
console.log(Meteor);
@landongn
landongn / gist:5801161
Created June 17, 2013 22:41
IOS7 built in fonts
Thonburi,
Academy Engraved LET,
Snell Roundhand,
Avenir,
Marker Felt,
Geeza Pro,
Arial Rounded MT Bold,
Trebuchet MS,
Arial,
Marion,

Generate the list yourself:

$ cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/
  Developer/SDKs/iPhoneOS*.sdk/System/Library/Frameworks/UIKit.framework/Headers
$ grep -H UI_APPEARANCE_SELECTOR ./* | sed 's/ __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0) UI_APPEARANCE_SELECTOR;//'

UIActivityIndicatorView

@landongn
landongn / tqkillscript.tcl
Last active December 21, 2015 02:09
code comment style
## Override required eggdrop.conf values, because text files can be large
set exclusive-mode 1
set max-queue-msg 102400
## Set up the namespace we'll be working in
namespace eval ::killscript {
## set this to 1 if you want spam in the eggdrop console
variable debug 1
## uncomment to stay explicit in namespace array creation
set exclusive-mode 1
set max-queue-msg 102400
namespace eval ::killscript {
variable debug 1
set script(name) "killscript.tcl"
set script(version) "1.5.1"
setudef flag killscript
set filename(lexicon) "killscript.txt"
set filename(dictionary) "killscript.dictionary"
angular.module('epk').directive('gallery', function factory() {
'use strict';
return {
restrict: 'E',
transclude: true,
replace: true,
templateUrl: 'views/directives/gallery.html',
link: function (scope, element, attrs) {
console.log('linked!');
console.log(scope, element, attrs);
@landongn
landongn / testRoute.js
Created August 27, 2013 17:58
testRoute
.HomeRoute = Ember.Route.extend({
model: function () {
return App.RootLevelAdapter.find();
},
didTransition: function () {
console.log('didtransition called');
$("#container").removeClass('intro');
$(".sidebar").removeClass('collapsed');
$("#copy").removeClass('collapsed');
}
package main
import (
"github.com/emicklei/go-restful"
"net/http"
"path"
)
var rootdir = "/Users/landon/Projects/web/Raddit/release"