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
#!/bin/sh | |
# THE PROBLEM HERE IS THAT WITHOUT HARD-CODING THE PATH | |
# IT MAY HAVE SOME ISSUES. | |
BASEPATH=$PWD | |
# THE BASIC ACTIONS | |
actions=( index new_one create edit update delete ) |
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
operator = "t" | |
number = Integer("2") | |
if operator =~ /^t/ | |
calc = -> n { n * number } | |
else | |
calc = -> n { n + number } | |
end | |
puts (1..10).collect(&calc).join(", ") |
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
brandon$ bundle | |
Fetching source index for http://rubygems.org/ | |
Using rake (0.9.2.2) | |
Using log4r (1.1.9) | |
Using XMLCanonicalizer (1.0.1) | |
Using multi_json (1.0.3) | |
Using activesupport (3.1.1) | |
Using builder (3.0.0) | |
Using i18n (0.6.0) | |
Using activemodel (3.1.1) |
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
// ==UserScript== | |
// @name Simple YouVersion Keyboard Pagination | |
// @author Brandon Hansen (https://github.com/ready4god2513) | |
// @description Turn the page on youversion via keyboard shortcuts. This is a Chrome Userscript that can be installed by saving as youversion.user.js and dragging in to Chrome. | |
// @match http://*.youversion.com/bible/* | |
// ==/UserScript== | |
document.onkeydown = function(e) | |
{ | |
if(e.keyCode == 37) |
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
[user] | |
name = Brandon Hansen | |
email = brandonh@ibethel.org | |
[core] | |
excludesfile = /Users/brandon/.global_ignore | |
editor = mate -w | |
[color] | |
ui = auto | |
[grep] | |
# Enable POSIX extended regex |
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
it "should remove previous answers before adding new ones" do | |
question.answers.should be_empty | |
question.answers = [Answer.new(result: result, choices: [choice])] | |
question.answers.count.should == 1 | |
question.answers = [Answer.new(result: result, choices: [choice2])] | |
question.answers.count.should == 1 | |
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 Object | |
def puts(str) | |
super unless str.include?("DEPRECATION WARNING: Passing a template handler") | |
end | |
def print(str) | |
super unless str.include?("DEPRECATION WARNING: Passing a template handler") | |
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
# Make an OrangeTree class. It should have a height method which returns its height, and a oneYearPasses method, | |
# which, when called, ages the tree one year. Each year the tree grows taller (however much you think an orange tree | |
# should grow in a year), and after some number of years (again, your call) the tree should die. For the first few years, | |
# it should not produce fruit, but after a while it should, and I guess that older trees produce more each year | |
# than younger trees... whatever you think makes most sense. And, of course, you should be able to countTheOranges | |
# (which returns the number of oranges on the tree), and pickAnOrange (which reduces the @orangeCount by one and | |
# returns a string telling you how delicious the orange was, or else it just tells you that there are no more | |
# oranges to pick this year). Make sure that any oranges you don't pick one year fall off before the next year. | |
class OrangeTree | |
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
I have seen this- | |
[shortcode] | |
do stuff | |
[/shortcode] | |
But I have not see this- | |
[shortcode] | |
do stuff |
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
PUBNUB.subscribe({ | |
channel : "/path", | |
message : function(message) | |
{ | |
$("#current-view-count").html(message.viewerCount); | |
} | |
}) | |
foreach($chartbeat->top as $top) |
OlderNewer