Skip to content

Instantly share code, notes, and snippets.

event before_all_transactions
event before_transaction
event aasm_fire_event (within transaction)
event after_commit (if event successful)
event after_transaction
event after_all_transactions
begin
event before_all_events
event before
./configure --with-lua-include=/opt/openresty/luajit/include/luajit-2.1/ --lua-suffix=jit --with-lua=/opt/openresty/luajit/
@silasb
silasb / README.md
Last active November 17, 2015 01:06

Encrypt Data

echo "data-to-encrypt" | ./encrypt.rb | pbcopy -
#!/bin/sh
read -s password
echo
echo "Password: $password"
# usage
# # echo "test" | sh test.sh
# Password: test
if $programname == 'web-1' then *.* @@x.x.x.x:1514
& stop
@silasb
silasb / init.lua
Created July 31, 2014 14:10
Ability to move window to east and west screens if we are already east or west wall.
function movewindow_righthalf()
local win = window.focusedwindow()
local win_size = win:size()
local win_point = win:topleft()
local newframe = win:screen():frame_without_dock_or_menu()
newframe.w = newframe.w / 2
newframe.x = newframe.x + newframe.w -- comment out this line to push it to left half of screen
local frame_already_on_east_wall = newframe.h == win_size.h and newframe.w == win_size.w and
/***
* MSP430G2231
* SPI Example
* Using MCP23S17
*
* Kerry D. Wong
* http://www.kerrywong.com
*
* 3/2013
*
GEM
remote: https://rubygems.org/
specs:
coderay (1.0.9)
haml (3.1.4)
i18n (0.6.0)
json (1.8.0)
mail (2.3.0)
i18n (>= 0.4.0)
mime-types (~> 1.16)
%link{ :rel => "stylesheet", :type => "text/css", :href => "/main.css" }
#main_id
welcome to {{.Name}}
.foo
bar
hello world