Skip to content

Instantly share code, notes, and snippets.

View cmhobbs's full-sized avatar
🍩
Waiting between the walls.

Christopher M. Hobbs cmhobbs

🍩
Waiting between the walls.
View GitHub Profile
#!/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');
<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 />
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 = {
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
require 'rubygems'
require 'eventmachine'
module EchoServer
def post_init
puts "-- CONNECTION ESTABLISHED"
end
def receive_data data
send_data "-- DATA RECEIVED"
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)
# build a recipe
ruby -r exerb/mkexy my_script.rb
# generate an executable from the recipe
exerb hello.exy
file = File.open(path, 'r')
send_data "#{path}>"
file.each_line {|line| send_data line}
def bzzt
puts "HRRRRRR"
end
bzzt
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'