Skip to content

Instantly share code, notes, and snippets.

View jlogsdon's full-sized avatar

James Logsdon jlogsdon

View GitHub Profile
SELECT
"structures"."id", "structures"."type", "structures"."scan_link", "structures"."notes", "structures"."updated_at",
"regions"."id" AS region_id, "regions"."name" AS region_name,
"constellations"."id" AS constellation_id, "constellations"."name" AS constellation_name,
"solar_systems"."id" AS solar_system_id, "solar_systems"."name" AS solar_system_name,
"planets"."id" AS planet_id, "planets"."idx" AS planet_idx,
"moons"."id" AS moon_id, "moons"."idx" AS moon_idx,
"alliances"."id" AS alliance_id, "alliances"."ticker" AS alliance_ticker, "alliances"."friendly" AS alliance_friendly,
"corporations"."id" AS corporation_id, "corporations"."ticker" AS corporation_ticker, "corporations"."friendly" AS corporation_friendly
FROM "structures"
@jlogsdon
jlogsdon / tmux.conf
Last active December 22, 2015 18:29
Requires `reattach-to-user-namespace` found at https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard
set -g default-command "reattach-to-user-namespace -l zsh"
setw -g mode-mouse on
setw -g mouse-select-window on
setw -g mouse-select-pane on
setw -g mouse-resize-pane on
setw -g mode-keys vi
bind-key ` copy-mode
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'x' copy-selection
using System;
using System.Reflection;
using System.Xml;
using System.Xml.Serialization;
using System.IO;
using System.Collections.Generic;
using nrw_rime_extract.utils;
using nrw_rime_extract.xml.generated_bindings;
@jlogsdon
jlogsdon / build.js
Last active December 18, 2015 11:59
#!/usr/bin/env node
var browserify = require('browserify'),
async = require('async'),
glob = require('glob'),
path = require('path'),
fs = require('fs'),
_bundleCounter = 0,
_buildCounter = 0,
_pieces = {};
/*
* New auth protocol cracked by Cerulean Studios and sent in to Gaim
*/
static void yahoo_process_auth_0x0b(struct yahoo_input_data *yid, const char *seed, const char *sn)
{
struct yahoo_packet *pack = NULL;
struct yahoo_data *yd = yid->yd;
md5_byte_t result[16];
md5_state_t ctx;
class FreeformHash < Hash
def initialize(*args)
super(*args)
self.default = proc { |hash, key| hash[key] = FreeformHash.new }
end
end
require 'curses'
module Sokoban
class Cell
attr_accessor :x, :y
def initialize(board, x=0, y=0)
@board = board
@x = x
@y = y
@jlogsdon
jlogsdon / user.rb
Created June 21, 2012 18:10 — forked from andrewwho/userimages.rake
hurray
class User < ActiveRecord::Base
def fetch_facebook_image
return false if authentications.blank?
auth = authentications.find_by_provider('facebook')
self.remote_image_url = "https://graph.facebook.com/"+auth.uid+"/picture?type=large"
self.save
end
end
class Configotron
cattr_accessor :configs
def self.load(file)
key = File.basename(file).gsub(/\..*$/, '')
configs[key] = YAML.load(file) # or whatever
end
def self.method_missing(key, *args)
configs[key] || super(key, *args)
class Test
def self.runs(thing)
define_method(thing) do |*args|
run_this_method thing, *args
end
end
def run_this_method(thing, *args)
puts "Running #{thing}"
end