This file contains hidden or 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
$n = '3 apples'; | |
$m = '2 oranges'; | |
print $n + $m; |
This file contains hidden or 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
# -*- tcl -*- | |
# @@PLEAC@@_NAME | |
# @@SKIP@@ Tcl | |
# @@PLEAC@@_WEB | |
# @@SKIP@@ http://tcl.tk/ | |
# @@PLEAC@@_INTRO |
This file contains hidden or 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
#!/usr/bin/env ruby | |
# transform a b c d | |
# x' = ax + by | |
# y' = cx + dy | |
def transform(x, y, vars) | |
a, b, c, d = vars[0].to_i, vars[1].to_i, vars[2].to_i, vars[3].to_i | |
x = a*x + b*y | |
y = c*x + d*y | |
return x, y |
This file contains hidden or 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
#========================================================================== | |
# Clock interaction | |
#========================================================================== | |
::itcl::class Clock { | |
package require Thread | |
constructor {supervisor type {tick_rate 1}} { | |
set itsSupervisor $supervisor |
This file contains hidden or 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/sh | |
#\ | |
exec tclsh "$0" "$@" | |
proc world args [puts "World has exploded"] | |
if "1 == 0" [world will explode] |
This file contains hidden or 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
Rubinius Crash Report #rbxcrashreport | |
[[Exception]] | |
A toplevel exception occurred | |
Could not submit gist (401 Unauthorized). Make sure you've set github.user and github.token in your Git config, or submit the crash report located at '/home/et/.rubinius_last_error' manually. (GistSubmissionError) | |
Backtrace: | |
Gist(Module)#write at compiled/lib/bin/report.rb:31 | |
Object#__script__ at compiled/lib/bin/report.rb:92 | |
Rubinius::CodeLoader#load_script at kernel/delta/codeloader.rb:65 |
This file contains hidden or 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
%: npm install -g express | |
npm ERR! Unsupported | |
npm ERR! Not compatible with your version of node/npm: [email protected] | |
npm ERR! Required: {"node":">= 0.4.1 < 0.5.0"} | |
npm ERR! Actual: {"npm":"1.0.30","node":"v0.5.5"} | |
npm ERR! | |
npm ERR! System Linux 2.6.40.3-0.fc15.x86_64 | |
npm ERR! command "node" "/home/et/local/bin/npm" "install" "-g" "express" | |
npm ERR! cwd /home/et/code/node | |
npm ERR! node -v v0.5.5 |
This file contains hidden or 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
➜ ruby-regex git:(master) padrino rake dm:reset | |
=> Executing Rake dm:reset ... | |
=> Dropping database 'Users/et/code/ruby-regex/db/development.db' | |
=> Creating database 'Users/et/code/ruby-regex/db/development.db' | |
== Performing Up Migration #1: create_regexes | |
CREATE TABLE "regexes" ("id" INTEGER PRIMARY KEY AUTOINCREMENT, "regex" VARCHAR(255), "options" VARCHAR(255), "test" TEXT, "slug" VARCHAR(255)) | |
-> 0.0014s | |
-> 0.0020s | |
<= dm:migrate:up executed | |
➜ ruby-regex git:(master) padrino rake test |
This file contains hidden or 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
source :rubygems | |
gem 'mysql', "~> 2.8.1" | |
gem 'rack', '~> 1.1.2' | |
gem 'systemu' | |
gem 'hpricot' | |
gem 'scoped_search' | |
group :development do | |
gem 'faker' |
This file contains hidden or 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 file is copied to ~/spec when you run 'ruby script/generate rspec' | |
# from the project root directory. | |
ENV["RAILS_ENV"] = "test" | |
require File.expand_path(File.dirname(__FILE__) + "/../config/environment") | |
require 'spec' | |
require 'spec/rails' | |
require File.dirname(__FILE__) + "/factories" | |
require 'rake' | |
require 'rake/testtask' | |
require 'rake/rdoctask' |
OlderNewer