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
# Framework | |
require 'foundations/compact' | |
# Gems | |
require 'palettes' | |
require 'cassandra' | |
# App | |
require 'views' | |
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 'rubygems' | |
require 'net/yail/IRCBot' | |
require 'hpricot' # For spitting out titles | |
require 'open-uri' | |
class Chewy < IRCBot | |
BOTNAME = 'Chewbotca' | |
BOTVERSION = '0.0.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
# .zshrc | |
# Lines configured by zsh-newuser-install | |
HISTFILE=~/.zshd/.histfile | |
HISTSIZE=1000 | |
SAVEHIST=1000 | |
setopt appendhistory extendedglob nomatch notify | |
bindkey -e | |
# End of lines configured by zsh-newuser-install | |
# The following lines were added by compinstall |
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
def gcd(i1,i2) | |
( i2 == 0 ? i1 : gcd(i2, i1 % i2) ) | |
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
id = lambda{|x| x} | |
eats = lambda{|x| eats } |
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
module False | |
def self.require(str) | |
$:.each{|cur| | |
if File.directory?(cur) | |
pos = Dir.entries(cur) | |
if ((pos.include? "#{str}.rb") or (pos.include? str) or (pos.include? "#{str}.so")) | |
total = File.expand_path(str, cur) | |
unless $".include? total | |
load(total) | |
$" << total |
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
codestr0m> Platform: 32-bit LSB 80386 | |
<codestr0m> Default Library Path (ELF): /lib:/usr/lib (system default) | |
<codestr0m> Trusted Directories (ELF): /lib/secure:/usr/lib/secure (system default) | |
<codestr0m> Platform: 64-bit LSB AMD64 | |
<codestr0m> Default Library Path (ELF): /lib/64:/usr/lib/64 (system default) | |
<codestr0m> Trusted Directories (ELF): /lib/secure/64:/usr/lib/secure/64 (system default) | |
<codestr0m> for the amd64 bits | |
<ab5tract> p4 2.0ghz | |
<codestr0m> /usr/lib/64' -> `amd64 |
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 Default < Waves::Configurations::Default | |
attribute 'wikiroot' | |
wikiroot File.join ENV["HOME"], "wiki" | |
... | |
end | |
class Development < Default | |
# You get the idea ;) |
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
Stop putting "require 'rubygems'" in your project files. Just madly require | |
away, assuming that whatever you need will be found in the load path. | |
Install dollarspots.rb early in your loadpath. It checks the pwd for a file | |
named .dollarspots.rb and loads it if found. Use .dollarspots.rb files locally | |
in projects to jigger with your loadpath such that your reckless requires | |
actually work. Note that this may involve saying "require 'rubygems'". | |
Call ruby with -rdollarspots, or set "rdollarspots" as your RUBYOPT. To get TextMate's RubyMate facilities to work you'll need to edit the RUBYOPT shell variable in the Prefs. |
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 my first attempt at p6, and I haven't coded perl since 2000, so be gentle ;) | |
use v6; | |
module WavesWorld { | |
use Waves <compact>; | |
# Taking advantage of roles and traits as opposed to the module mixin style utilized by Waves | |
class Map is Resource { # You can imagine roles here too: 'does Media', 'does Reload', etc. | |
# This is the simplest example, and doesn't pretend to provide the convenience of the Waves routing DSL... |