Skip to content

Instantly share code, notes, and snippets.

View octopusinc's full-sized avatar

Judd Kussrow octopusinc

View GitHub Profile
//
// ReserveAmerica auto clicker v2
// Wade Brainerd <[email protected]>
//
// This script repeatedly clicks the Book these Dates button
// for a ReserveAmerica campsite, e.g. Bahia Honda. Given a
// start time and duration, it will repeatdly click the button
// until the button disappears or the duration expires.
//
// Usage:
@foozmeat
foozmeat / tor_relay_on_solar_vps.md
Last active September 25, 2022 16:37
Tor Relay on Solar VPS w/ Ubuntu. Includes optional exit relay setup.

Setting up a Tor Relay on a Solar VPS (OUTDATED)

Please take extra care when following these instructions. They're outdated and may not reflect best practices any longer

This guide is being written for someone who knows their way around Linux/Unix and is comfortable with the responsibility of running their own server. Running this configuration should cost you about $5/month. If you're not comfortable setting up your own server then donating that $5 to other Tor relay operators is still helpful.

Open the following pages up for reference. Ideally you should read through them before beginning.

@brandonb927
brandonb927 / osx-for-hackers.sh
Last active April 3, 2025 13:20
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@ewoodh2o
ewoodh2o / Gemfile
Created March 20, 2012 01:45
Sample Like Gate Coupon in Rails
source 'http://rubygems.org'
gem 'rails', '3.0.10'
# ... include whatever you need, but the following is pertinent
gem 'fb_graph'
@Olical
Olical / Documentation.md
Created September 22, 2011 12:07
Preloader.js - Preload all assets, ideally for a game, using MooTools

About

This class allows you to preload all of your images, sounds, videos, JSON, JavaScript and CSS files with one call. It provides you with progress reports and lets you know when everything is done.

It requires MooTools and MooTools More with the Assets and Request.JSONP boxes ticked. I have attached a copy of the required MooTools More version to this gist.

Example

You can find an example here on jsFiddle.

# Updates the +payment_state+ attribute according to the following logic:
#
# paid when +payment_total+ is equal to +total+
# balance_due when +payment_total+ is less than +total+
# credit_owed when +payment_total+ is greater than +total+
# failed when most recent payment is in the failed state
#
# The +payment_state+ value helps with reporting, etc. since it provides a quick and easy way to locate Orders needing attention.
def update_payment_state
if round_money(payment_total) < round_money(total)
# Usage example:
#
# Main.register Sinatra::UserAgentHelpers
#
# -# haml
# %body{class: browser.body_class}
#
# - if browser.ios?
# %script{:language => 'text/javascript', :src => '/js/jqtouch.js'}
# %p Download our mobile app in the iTunes store!
@octopusinc
octopusinc / shoestring.rb
Created March 20, 2010 21:31
Rails template for basic application
# shoestring.rb
# Rails template
# from Judd Kussrow of Octopus Inc
# $ rails new Project -Jm http://octopusinc.com/shoestring.rb
################################### MAINTENANCE ######
gem 'rails3-generators', :group => 'development'
gem 'nifty-generators', :group => 'development'
@tylerhunt
tylerhunt / gist:206213
Created October 9, 2009 18:03
Rack middleware that redirects requests to a canonical host.
class CanonicalHost
def initialize(app, host=nil, &block)
@app = app
@host = (block_given? && block.call) || host
end
def call(env)
if url = url(env)
[301, { 'Location' => url }, ['Redirecting...']]
else
@peterc
peterc / gist:33337
Created December 8, 2008 03:42
Fully featured Rails template (for Rails 2.3)
# SUPER DARING APP TEMPLATE 1.0
# By Peter Cooper
# Link to local copy of edge rails
inside('vendor') { run 'ln -s ~/dev/rails/rails rails' }
# Delete unnecessary files
run "rm README"
run "rm public/index.html"
run "rm public/favicon.ico"