❤️🔥
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 Terminal Theme for IRCButt [highlight mod] | |
// @namespace http://userstyles.org | |
// @description This theme started as modification of the wonderful Terminal Theme for IRCButt by kirbylover4000 (version 2.0), just to fix the bright red text highlighting. | |
// @author Specimen | |
// @homepage http://userstyles.org/styles/96192 | |
// @include https://ircbutt.com/* | |
// @include https://www.ircbutt.com/* | |
// @include https://alpha.ircbutt.com/* | |
// @run-at document-start |
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 Terminal Theme for IRCButt [highlight mod] | |
// @namespace http://userstyles.org | |
// @description This theme started as modification of the wonderful Terminal Theme for IRCButt by kirbylover4000 (version 2.0), just to fix the bright red text highlighting. | |
// @author Specimen | |
// @homepage http://userstyles.org/styles/96192 | |
// @include https://ircbutt.com/* | |
// @include https://www.ircbutt.com/* | |
// @include https://alpha.ircbutt.com/* | |
// @run-at document-start |
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
puts "Gob's Program: Y/N?" | |
print "? " | |
answer = gets.chomp | |
if answer == "Y" | |
while true | |
print "Penus " | |
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
### Keybase proof | |
I hereby claim: | |
* I am evanwalsh on github. | |
* I am evanwalsh (https://keybase.io/evanwalsh) on keybase. | |
* I have a public key whose fingerprint is 17E6 2822 7D1A 3BE7 F61E 7968 25D3 BCFA BB9C 9810 | |
To claim this, I am signing this object: |
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
# A model for Ruby on Rails that gets settings from a DB | |
# And it caches them! Success! | |
class Preference < ActiveRecord::Base | |
def self.get(name) | |
return Rails.cache.fetch(name) { | |
output = self.find_by_name!(name) | |
Rails.cache.write(name,output.value) | |
} |
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
# Put this in routes.rb at the very bottom (right before end) | |
map.error '*path', :controller => 'application', :action => 'rescue_404' | |
# Put this in application.rb | |
rescue_from ActiveRecord::RecordNotFound, ActionController::UnknownAction, :with => :rescue_404 | |
def rescue_404 | |
render :template => "errors/404", :layout => "application", :status => "404" |
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 | |
# Let's get a git repo on a host that doesn't have it | |
curl -L http://github.com/$1/$2/tarball/master -o $1-$2.tar.gz > /dev/null | |
echo "Download of tarball complete." | |
tar -xf $1-$2.tar.gz > /dev/null | |
rm $1-$2.tar.gz | |
echo "Untarring of tarball complete." | |
echo "Feel free to change to the new dir" |
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
// C IS FOR COOKIE originally by Mislav Marohnić ( http://mislav.uniqpath.com/js/c-is-for-cookie/ ) | |
// chopped and spliced by Evan Walsh | |
var Cookie = { | |
find: function(name){ | |
var name = escape(name) + '=' | |
if (document.cookie.indexOf(name) >= 0) { | |
var cookies = document.cookie.split(/\s*;\s*/) | |
for (var i = 0; i < cookies.length; i++) { | |
if (cookies[i].indexOf(name) == 0) | |
return unescape(cookies[i].substring(name.length, cookies[i].length)) |
OlderNewer