Skip to content

Instantly share code, notes, and snippets.

View waltz's full-sized avatar
🥑
avocado is good

CJ Bryan waltz

🥑
avocado is good
View GitHub Profile
Shoes.app do
boxes = []
5.times do
boxes << edit_line
end
info boxes.size
end
#! /usr/bin/env ruby
require 'net/http'
require 'uri'
loop do
response = Net::HTTP.post_form(URI.parse("http://www.bultannews.com/pages/index.php"),
{ :cid => '14164',
:contact_name => 'JERK!',
:comment_mail => 'jerk@foo.net',
def throws_error
raise StandardError
rescue StandardError
puts "WHAT NOW!"
end
{
"leaderboard": [
{
"leader": {
"url": "http://techcrunch.com",
"rank": 1,
"presence": "14.29%"
}
},
{
@waltz
waltz / getTabFromBrowser.js
Created July 25, 2011 15:12
How to get a Tab with a Browser in a Firefox Addon/Extension
function getTabFromBrowser(browser)
{
var tab_container = gBrowser.tabContainer;
var browser_panel = browser.parentNode.parentNode;
for (var i = 0; i < tab_container.itemCount; i++)
{
var tab = tab_container.getItemAtIndex(i);
if (tab.linkedPanel == browser_panel.id)
{
<li><a href="http://wikipedia.org"><span>Wikipedia</span> (<a href="http://en.wikipedia.org/wiki/Wikipedia:SOPA_initiative/Action">announcement</a>)</li>
<li><a href="http://reddit.com">reddit</a> - (<a href="http://blog.reddit.com/2012/01/stopped-they-must-be-on-this-all.html">announcement</a>)</li>
<li><a href="http://mozilla.org">Mozilla</a> (<a href="">announcement</a>)</li>
<li><a href="http://wordpress.org">Wordpress</a> (<a href="http://wordpress.org/news/2012/01/help-stop-sopa-pipa/">announcement</a>)</li>
<li><a href="http://icanhascheezburger.com/">icanhazcheezburger network sites (FailBlog, theDailyWhat,Know Your Meme, etc)</a> (<a href="https://twitter.com/#!/benhuh/status/157538541155516416">announcement</a></li>
<li><a href="http://tucows.com">Tucows</a> (<a href="http://tucowsinc.com/news/2012/01/why-we-dont-like-sopa/">announcement</a>)</li>
<li><a href="http://vanillaforums.org/">VanillaForums</a></li>
<li><a href="http://opencongress.com">Open Congress / PPF</a></li>
<li><a href="http://getm
include stdlib
include apache
class { 'apache::mod::php':
user => 'vagrant',
group => 'vagrant',
}
apache::vhost { $fqdn :
priority => '20',
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@waltz
waltz / .zshrc
Created January 27, 2014 22:22
ZSH, iTerm2 Alt-Arrow (Left/Right) Key remap
# Remap alt-left and alt-right to forward/backward word skips.
# via @waltz, https://gist.github.com/waltz/8658549
bindkey "^[^[[D" backward-word
bindkey "^[^[[C" forward-word
actionpack (4.0.0) lib/action_dispatch/routing/url_for.rb:155:in `url_for'
actionpack (4.0.0) lib/action_view/routing_url_for.rb:83:in `url_for'
turbolinks (2.2.2) lib/turbolinks/xhr_url_for.rb:12:in `url_for_with_xhr_referer'
app/views/voice_answers/index.html.erb:28:in `_app_views_voice_answers_index_html_erb___4585313517362585894_70275830966900'
actionpack (4.0.0) lib/action_view/template.rb:143:in `block in render'
activesupport (4.0.0) lib/active_support/notifications.rb:161:in `instrument'
actionpack (4.0.0) lib/action_view/template.rb:141:in `render'
actionpack (4.0.0) lib/action_view/renderer/template_renderer.rb:49:in `block (2 levels) in render_template'
actionpack (4.0.0) lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument'
activesupport (4.0.0) lib/active_support/notifications.rb:159:in `block in instrument'