Skip to content

Instantly share code, notes, and snippets.

💭
Independent contracting and consulting, starting August, 2019

Rick Bradley rick

💭
Independent contracting and consulting, starting August, 2019
Block or report user

Report or block rick

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
View gist:56
Guildhouse System Edited by spgm Member of Trinitycore for 3.3.3 Rev 8670
diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt
--- a/sql/CMakeLists.txt
+++ b/sql/CMakeLists.txt
@@ -1,3 +1,4 @@
+add_subdirectory(GuildHouse)
add_subdirectory(updates)
add_subdirectory(scripts)
add_subdirectory(base)
We couldn’t find that file to show.
We couldn’t find that file to show.
We couldn’t find that file to show.
View gist:5152
def paginator
if @pager.number_of_pages>1
p = "<div id='paginator'>"
p << link_to("1", {:page => 1}, :title => "Page 1")+" " if @pager.number_of_pages>7 and @page.number>4
p << "... " if @pager.number_of_pages>8 and @page.number>5
p << link_to(@page.number-6, {:page => @page.number-6}, :title => "Page " + (@page.number-6).to_s)+" " if @page.number>6 and @pager.number_of_pages<@page.number+1
p << link_to(@page.number-5, {:page => @page.number-5}, :title => "Page " + (@page.number-5).to_s)+" " if @page.number>5 and @pager.number_of_pages<@page.number+2
p << link_to(@page.number-4, {:page => @page.number-4}, :title => "Page " + (@page.number-4).to_s)+" " if @page.number>4 and @pager.number_of_pages<@page.number+3
p << link_to(@page.number-3, {:page => @page.number-3}, :title => "Page " + (@page.number-3).to_s)+" " if @page.number>3
p << link_to(@page.number-2, {:page => @page.number-2}, :title => "Page " + (@page.number-2).to_s)+" " if @page.number>
View gist:5283
module Spec::Example::ExampleGroupMethods
def currently(name, &block)
it("*** CURRENTLY *** #{name}", &block)
end
end
View gist:6849
require 'autotest/redgreen'
require 'autotest/timestamp'
require '~/autotest/sound/sound.rb'
Autotest::Sound.sound_path = "~/autotest/sound/sound_fx/current/"
Autotest.add_hook :initialize do |at|
%w{.svn .hg .git vendor db index public tmp log}.each {|exception|at.add_exception(exception+'/')}
end
View gist:7121
/Volumes/share/audio/mp3/wilson_picket/a_man_and_a_half_disc_1$ musicdns 01_i_found_a_love_the_falcons.mp3
/opt/local/lib/ruby/gems/1.8/gems/earworm-0.0.2/lib/earworm/fingerprint.rb:79:in `id3_info_for': undefined method `[]' for nil:NilClass (NoMethodError)
from /opt/local/lib/ruby/gems/1.8/gems/earworm-0.0.2/lib/earworm/fingerprint.rb:29:in `to_hash'
from /opt/local/lib/ruby/gems/1.8/gems/earworm-0.0.2/lib/earworm/client.rb:16:in `identify'
from /Users/rick/bin/musicdns:14
View hack
#!/bin/sh -x
CURRENT=`git branch | grep '\*' | awk '{print $2}'`
git checkout master
git pull origin master
git checkout ${CURRENT}
git rebase master
View gist:7982
function git-svn-repo? {
git branch -r 2>/dev/null | awk '{if ($1=="git-svn") {exit 0} else {exit 1}}'
}
function git-agnostic-pull {
if $(git-svn-repo?); then
git svn rebase
else
git pull origin master
fi
You can’t perform that action at this time.