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
(defun my-align-regexp (start end regexp) | |
"repeat alignment with respect to | |
the given regular expression" | |
(interactive "r\nsAlign regexp: ") | |
(align-regexp start end | |
(concat "\\(\\s-*\\)" regexp) 1 1 t)) |
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 'sinatra/base' | |
require 'dress' | |
require 'pp' | |
class Site < Dress::Maker | |
layout { | |
html { | |
head { title("Admin") } | |
body { content } |
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 'thin' | |
require 'versapay' | |
require 'run/common' | |
# t = Thread.new { | |
# puts "thread: #{Thread.current}" | |
# } |
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
################### | |
# #### RUBY STUFF | |
define eval | |
call(rb_p(rb_eval_string_protect($arg0,(int*)0))) | |
end | |
define redirect_stdout | |
call rb_eval_string("$_old_stdout, $stdout = $stdout, File.open('/tmp/ruby-debug.' + Process.pid.to_s, 'a'); $stdout.sync = true") |
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
# unicorn_rails -c uni.rb -E production -D | |
rails_env = ENV['RAILS_ENV'] || 'production' | |
# 16 workers and 1 master | |
worker_processes (rails_env == 'production' ? 16 : 4) | |
# Load rails+github.git into the master before forking workers | |
# for super-fast worker spawn times | |
preload_app true |
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
When a self-help book urges you to bend reality, I | |
think what it boils down to is that people can | |
take a lot of a abuse. But most of us are not | |
psychopathic enough to take advantage of | |
people. Unfortunately for us individually, | |
fortunately for us as a society. | |
It's really a phenomenon of the modern world. In | |
prehistoric time, I suppose, if you fuck somebody, |
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 'dress' | |
class Dresser < ActionController::Base | |
class Page < Dress::ActiveView | |
# TODO layout should render in the context of the page | |
layout do | |
html { | |
head { | |
meta("content" => "text/html; charset=UTF-8", "http-equiv" => "Content-Type") | |
title("VersaPay EFT Admin") | |
} |
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
┌[~/tr][pts/5] | |
└> ENV=dev rake db:migrate | |
(in /home/howard/vp/transaction) | |
Migrating database vp_dev | |
-- add_column("authorizations", "recipient_user_id", :integer) | |
-> 0.2137s | |
-- rename_column("authorizations", "originator", "sender_user_id") | |
-> 0.0015s | |
-- rename_column("authorizations", "sender", "sender_account_id") | |
-> 0.0018s |
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
[It is often said that if only we can hear each other, then we will | |
fall in love. What separates us, always, isn't space, but vacuum. We | |
can be close, yet never be together. We stand facing each other, but | |
are incapable of seeing each other. So it is, we are doomed to eternal | |
loneliness. Yearning for a love, clearly seen, within grasp, but | |
separated by a glass wall. | |
The woman is trapped in a glass chamber, and the man, lost in his | |
wandering, chanced upon her, and finds her suffocating, slowly dying | |
from her own exhalation. Only a sheet of glass separates them, |
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
Thinkers and Doers | |
There's really no such thing as being a "thinker" | |
who can't get things done and being a "doer" who | |
doesn't think much. | |
Each of us has a fixed quantity of energy we can | |
use any given day. Thinking and doing are both | |
activities that consume the energy. |
OlderNewer