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
#!/usr/bin/env perl | |
# rtqc.pl - RT quick ticket idiot box | |
use Tk; | |
$RT_PATH = "FIXPATH"; | |
$topWin = MainWindow -> new(); | |
$topWin -> configure(-title => 'GENERAL QUEUE QUICK COMMIT'); |
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
<p><b>account: <%= @client.acct %></b></p> | |
<form action="/update/<%= @client.acct %>" method="post" id="client" enctype="multipart/form-data"> | |
<p> | |
<label>Client Name:</label></br /> | |
<input type="text" name="client[name]" id="name" value="<%= @client.name %>"/> | |
</p> | |
<p> | |
<label>Company Name:</label><br /> |
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
get '/edit/:acct' do | |
@title = "Edit Client Data" | |
@client = HE_Backend.get(params[:acct]) | |
erb :edit | |
end | |
post '/update/:acct' do | |
client = HE_Backend.get(params[:acct]) | |
client.attributes = { |
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
filetype plugin on | |
filetype indent on | |
set t_Co=256 | |
syntax on | |
colorscheme obsidian | |
source ~/.vim/plugin/bufferlist.vim | |
map <silent> <F3> :call BufferList()<CR> | |
set number |
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 'eventmachine' | |
module EchoServer | |
def post_init | |
puts "-- CONNECTION ESTABLISHED" | |
end | |
def receive_data data | |
send_data "-- DATA RECEIVED" |
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 'eventmachine' | |
module Client | |
def post_init | |
send_data "test_data.txt>" | |
EventMachine::send_file_data @signature, "test_data.txt" | |
end | |
def receive_data(data) |
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
# build a recipe | |
ruby -r exerb/mkexy my_script.rb | |
# generate an executable from the recipe | |
exerb hello.exy |
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
file = File.open(path, 'r') | |
send_data "#{path}>" | |
file.each_line {|line| send_data line} |
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 bzzt | |
puts "HRRRRRR" | |
end | |
bzzt |
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
hobbsc@haqnode:~/dev/j$ ./j.rb --list | |
TIME - ENTRY - CYCLE - ITERATION | |
/home/hobbsc/.rvm/gems/ruby-1.9.2-p0/gems/dm-core-1.0.2/lib/dm-core/resource/state/persisted.rb:23:in `lazy_load': undefined method `lazy_load' for nil:NilClass (NoMethodError) | |
from /home/hobbsc/.rvm/gems/ruby-1.9.2-p0/gems/dm-core-1.0.2/lib/dm-core/resource/state/persisted.rb:8:in `get' | |
from /home/hobbsc/.rvm/gems/ruby-1.9.2-p0/gems/dm-core-1.0.2/lib/dm-core/resource.rb:254:in `attribute_get' | |
from ./j.rb:84:in `block in list' | |
from /home/hobbsc/.rvm/gems/ruby-1.9.2-p0/gems/dm-core-1.0.2/lib/dm-core/collection.rb:511:in `block in each' | |
from /home/hobbsc/.rvm/gems/ruby-1.9.2-p0/gems/dm-core-1.0.2/lib/dm-core/support/lazy_array.rb:413:in `block in each' | |
from /home/hobbsc/.rvm/gems/ruby-1.9.2-p0/gems/dm-core-1.0.2/lib/dm-core/support/lazy_array.rb:413:in `each' | |
from /home/hobbsc/.rvm/gems/ruby-1.9.2-p0/gems/dm-core-1.0.2/lib/dm-core/support/lazy_array.rb:413:in `each' |
OlderNewer