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
# 1) Point *.example.com in your DNS setup to your server. | |
# | |
# 2) Setup an Apache vhost to catch the star pointer: | |
# | |
# <VirtualHost *:80> | |
# ServerName *.example.com | |
# </VirtualHost> | |
# | |
# 3) Set the current account from the subdomain | |
class ApplicationController < ActionController::Base |
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
# This is a trivial HTTP proxy server, intended for use as a troubleshooting tool | |
# ONLY (not for real, actual, production use). I wrote this because I couldn't find | |
# a simple HTTP proxy that I could use to test HTTP proxy support in Net::SSH. | |
# | |
# This code is in the public domain, so do with it what you will! | |
require 'socket' | |
server = TCPServer.new('127.0.0.1', 8080) | |
client = server.accept |
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
EASY MARSHMALLOWS | |
----------------- | |
Marshmallows are perhaps one of the simplest confections you can make. They only require | |
a handful of ingredients, a batch can be thrown together in 10-15 minutes (plus *cough* | |
3 hours for them to set), and you can flavor them however you like. (You haven't LIVED | |
until you've had coconut marshmallows!) | |
Hardware needed: |
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
(1..100).each do |i| | |
if i % 15 == 0 | |
puts 'FizzBuzz' | |
elsif i % 5 == 0 | |
puts 'Buzz' | |
elsif i % 3 == 0 | |
puts "Fizz" | |
else | |
puts i | |
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
#!/bin/bash | |
cd /home/graham/ruckus/www | |
scripts/sync_assets.sh pdf www down | |
scripts/sync_assets.sh media www down | |
scripts/sync_assets.sh artwork www down |
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 AddPublishedAtToTrainingAtps < ActiveRecord::Migration | |
def self.up | |
add_column :training_atps, :published_at, :timestamp | |
end | |
def self.down | |
remove_column :training_atps, :published_at | |
end | |
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
#!/bin/bash | |
# Author: Chmouel Boudjnah <[email protected]> | |
# Not officially supported by Rackspace only as a best effort basis :) | |
# Define yes to make it to copy to url to clipboard (via a shortened url | |
# service) You need to have the software xclip installed in your system. | |
COPY_URL_TO_CLIPBOARD=yes | |
# Containers to ignore in the list | |
CONTAINERS_TO_IGNORE=".CDN_ACCESS_LOGS" |
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
require 'socket' # Sockets are in standard library | |
hostname = 'texas.aprs2.net' | |
#hostname = 'first.aprs.net' | |
port = 14580 | |
begin | |
s = TCPSocket.open(hostname, port) | |
rescue | |
puts "error: #{$!}" |
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
["WX5DF-7>S1UT8T", "W5BEC-5", "WD5IYT-2*", "WIDE3-1", "qAR", "WB5AOH:'}]k!IWK\\]\"5w}Listening on 147.06/R 73Doug "] | |
["WT5B-13>APOTC1", "W5MRC-14", "WIDE1*", "WIDE2-2", "qAR", "N0RQ:/011816z3254.84N/09626.48W>/A=000539 12.7V 50CWT5B [email protected]"] | |
["N5WYN>APRS", "W5EEY-3", "K5FTW-5*", "WIDE2", "qAR", "KE5BTY:SevenPoints", "TX [email protected] EM12vh"] | |
["KD5UMO-1>APU25N", "TCPIP*", "qAC", "T2MSSOURI:>191800zSKYWARN 147.180+107.2"] | |
["KF5DDX-9>SRTQ1U", "W5EEY-3", "WIDE1", "KK5PP-3", "WIDE2*", "qAR", "KK5MR-4:`|(lrrr>/`\"5U}_ "] | |
["WB5NZV-8>APW272", "W5NGU-4*", "WIDE2-1", "qAR", "KE5BTY:_09192015c156s000g000t093r000p000P000h32b10200wRSW"] | |
["KC5DFC-3>APRS", "TCPIP*", "qAC", "T2MCI:@191816z3255.45N/09635.10W_292/000g002t104r000p000P000h022b10690IMS"] | |
["KA5DRP-9>APT405", "K5FTW-5*", "WIDE2-1", "qAR", "WB5RXA:T#813", "256", "164", "112", "084", "253", "00000000"] | |
["W5GDC-1>S3QS0W", "RELAY", "WIDE3-3", "qAR", "AE5PL-10:'|B'l\"?f/]\"69}"] | |
["W5GDC-1>S3QS0W", "W5BEC-5*", "WD5IYT-2*", "WIDE3*", "qAR", "K5COD:'|B'l\"?f/] |
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
Using the default profile... | |
WARNING: No DRb server is running. Running features locally: | |
uninitialized constant Mail (NameError) | |
/Users/graham/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.10/lib/active_support/dependencies.rb:469:in `load_missing_constant' | |
/Users/graham/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.10/lib/active_support/dependencies.rb:106:in `const_missing' | |
/Users/graham/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.10/lib/active_support/dependencies.rb:118:in `const_missing' | |
/Users/graham/.rvm/gems/ruby-1.8.7-p302/gems/rspec-expectations-2.0.1/lib/rspec/expectations/backward_compatibility.rb:6:in `const_missing' | |
/Users/graham/.rvm/gems/ruby-1.8.7-p302/gems/rspec-core-2.0.1/lib/rspec/core/backward_compatibility.rb:20:in `const_missing' | |
/Users/graham/.rvm/gems/ruby-1.8.7-p302/gems/email_spec-1.0.0/lib/email_spec/mail_ext.rb:11 | |
/Users/graham/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' |
OlderNewer