Skip to content

Instantly share code, notes, and snippets.

@netinlet
netinlet / smtp_tls.rb
Created March 22, 2009 00:26
SMTP Extension to allow ActionMailer to use Google Mail SMTP
#
# SMTP Extension to allow ActionMailer to use Google Mail SMTP
#
# http://godbit.com/forum/viewtopic.php?id=876
require "openssl"
require "net/smtp"
Net::SMTP.class_eval do
private
Getting up and running with OS X, Textmate & Scheme
===================================================
SCHEME
======
I ran across two implementations of Scheme which appear to work well with OS X.
mit-scheme & PLT Scheme.
I was able to install mit-scheme from darwin ports ( sudo port install mit-scheme)
@netinlet
netinlet / gist:2159172
Created March 22, 2012 15:57
Ruote Concurrence
require 'rubygems'
begin
require 'yajl'
rescue LoadError => le
require 'json'
end
require 'ruote'
require 'ruote/storage/fs_storage'
@netinlet
netinlet / gist:2207156
Created March 26, 2012 17:36
ruote history
module Ruote
class StorageHistory
def steps_by_process(wfid)
# which ones were 'executed' - filters out items like setting up sequence and concurrence steps
all_expressions = self.by_process(wfid)
dispatched_expressions = all_expressions.select{|flow_expr| 'dispatched' == flow_expr["action"]}
# for all the flow_expressions, get the name and order by sorting by the original timestamp
dispatched_expressions.map do |flow_expr|
[flow_expr['participant_name'], flow_expr["original_put_at"]]
end.sort{|a,b| a.last <=> b.last}.map{|exp| exp.first}
@netinlet
netinlet / json_decode_error.rb
Created March 26, 2012 21:39
json decode error
# THE SQL for the Case object is above the Case Object
# To generate error
# to run: bundle exec ruby json_decode_error.rb
# http://localhost:4567/start
# Copy the WFID which is printed
# http://localhost:4567/history/:wfid
require 'rubygems'
require 'ruote'
source :rubygems
gem 'activerecord', '3.1.0', :require => "active_record"
gem 'haml'
gem 'padrino', '0.10.5'
gem 'pg'
gem 'rake'
gem 'redis'
gem 'ruote', "~> 2.3.0", :require => "ruote"
@netinlet
netinlet / gist:5187479
Created March 18, 2013 14:22
http timeout when calling into a unicorn process
#==== Gemfile ====
source :rubygems
gem 'sinatra', :require => 'sinatra/base'
gem 'rest-client'
gem 'unicorn'
gem 'puma'
#==== config.ru ====
@netinlet
netinlet / keybase.md
Created March 15, 2016 15:53
Keybase Identity

Keybase proof

I hereby claim:

  • I am netinlet on github.
  • I am dougbryant (https://keybase.io/dougbryant) on keybase.
  • I have a public key whose fingerprint is 2F79 B742 E642 2C45 FA38 4153 FBDA 81FC 0540 AB6D

To claim this, I am signing this object:

@netinlet
netinlet / aws_notes.txt
Last active March 16, 2016 01:45
AWS Notes
Autoscaling has lifecycle hooks https://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/lifecycle-hooks.html#lifecycle-hook-wait-state
Code Deploy Github integration https://docs.aws.amazon.com/codedeploy/latest/userguide/github-integ.html#github-integ-steps
@netinlet
netinlet / phoenix-app.service
Created September 28, 2016 12:22 — forked from kzkin/phoenix-app.service
systemd service for phoenix framework release (exrm)
# Phoenix Framework - A productive web framework that does not compromise speed and maintainability
[Unit]
Description=Phoenix Framework ISControl Application
After=network.target
[Service]
Type=simple
User=deployer
RemainAfterExit=yes