Skip to content

Instantly share code, notes, and snippets.

View technoweenie's full-sized avatar
👾
beep boop

technoweenie

👾
beep boop
View GitHub Profile
# access these directory shortcuts
# with ~rails, ~beast, etc
p=~/p
w=~/w
rails=~/p/rails/git
todo=~/Documents/todo
# Input stuff.
bindkey -e
@technoweenie
technoweenie / gist:48626ce7f12acf100131
Last active August 29, 2015 14:08
Marvel Comic suggestions

Random Stuff

  • Ultimates vol 1 and 2 (don't read 3, lol)
  • Daredevil vol 2 #1-19, 26-81

Avengers (roughly in chronological order)

  • Avengers Disassembled
  • New Avengers vol 1 (2005)
  • Captain America vol 5 (2005) #1-24
diff --git a/test/cmd/lfstest-shasum.go b/test/cmd/lfstest-shasum.go
new file mode 100644
index 0000000..6ef16ee
--- /dev/null
+++ b/test/cmd/lfstest-shasum.go
@@ -0,0 +1,44 @@
+package main
+
+import (
+ "crypto/sha256"
class Status < ActiveRecord::Base
can_search do
scoped_by :user
scoped_by :created, :scope => :date_range
end
# user_id can be an integer or nil
def self.filter(user_id, filter, options = {})
# filter can be :daily, :monthly, etc,
# see DateRangeScope in can_serach plugin
diff --git a/vendor/plugins/thinking-sphinx/lib/thinking_sphinx/active_record/delta.rb b/vendor/plugins/thinking-sphinx/lib/thinking_sphinx/active_record/delta.rb
index 88da2bd..20c4570 100644
--- a/vendor/plugins/thinking-sphinx/lib/thinking_sphinx/active_record/delta.rb
+++ b/vendor/plugins/thinking-sphinx/lib/thinking_sphinx/active_record/delta.rb
@@ -85,7 +85,9 @@ module ThinkingSphinx
{self.id => 1}
) if self.in_core_index?
- system "indexer --config #{config.config_file} --rotate #{self.class.indexes.first.name}_delta"
+ cmd = "indexer --config #{config.config_file} --rotate #{self.class.indexes.first.name}_delta"
@technoweenie
technoweenie / gist:9345
Created September 8, 2008 00:15 — forked from kneath/gist:9337
// Beginning of a Ubiquty script for use with xtt
CmdUtils.CreateCommand({
name: "xtt",
takes: {status: noun_arb_text},
preview: function(previewBlock, statusText) {
var previewTemplate = "Updates your XTT status to: <br/>" +
"<b>${status}</b><br /><br />";
var previewData = {
/*
=============
ai_walk
The monster is walking it's beat
=============
*/
void ai_walk (edict_t *self, float dist)
{
M_MoveToGoal (self, dist);
def nuke_terminator(pid)
Process.kill("KILL", pid) rescue nil
Process.wait(pid) rescue nil
end
# OR
def nuke_terminator(pid)
Process.kill("KILL", pid)
Process.wait(pid)
>> class Oo
>> def O *args
>> raise *args
>> end
>> end
=> nil
>> class Object
>> def o
>> Oo.new
>> end