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
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" |
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
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 |
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
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; |
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
#!/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 = {}; |
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
/* | |
* 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; |
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
class FreeformHash < Hash | |
def initialize(*args) | |
super(*args) | |
self.default = proc { |hash, key| hash[key] = FreeformHash.new } | |
end | |
end |
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
require 'curses' | |
module Sokoban | |
class Cell | |
attr_accessor :x, :y | |
def initialize(board, x=0, y=0) | |
@board = board | |
@x = x | |
@y = y |
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
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 |
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
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) |
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
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 |