Skip to content

Instantly share code, notes, and snippets.

View jlbfalcao's full-sized avatar

Jorge Falcão jlbfalcao

View GitHub Profile
@molaschi
molaschi / stash_slack_integration.md
Created June 4, 2014 17:10
Integrate Stash with Slack using webhooks

This is a short article on how we integrate stash and slack in openmind

First of all i assume you have:

  • a working stash installation
  • a repository you to notify slack on pushes
  • stash user with administration priviledges
  • full access to the server (linux) where stash is installed on
  • a team configured on slack
  • slack user with administration priviledges
@calvincorreli
calvincorreli / set_default_form_builder.rb
Created November 8, 2011 17:54
Set default form builder with autoload
module ActionView
module Helpers
module FormHelper
def form_for_with_bootstrap(record, options = {}, &proc)
options[:builder] = BootstrapFormBuilder
form_for_without_bootstrap(record, options, &proc)
end
def fields_for_with_bootstrap(record_name, record_object = nil, options = {}, &block)
options[:builder] = BootstrapFormBuilder
@nicksieger
nicksieger / akuma.rb
Created October 11, 2011 17:33
Daemonizing JRuby with Akuma
require 'rubygems'
require 'java'
require 'mvn:org.kohsuke:akuma'
d = com.sun.akuma.Daemon.new
if d.daemonized?
puts "Daemonizing with PID #{$$}"
d.init
else
d.daemonize
@mxcl
mxcl / rsync+watcher.rb
Created July 18, 2009 09:32
rsync whenever the directory the script is in changes using the OS X FSEvents API
#!/usr/bin/ruby
require 'osx/foundation'
OSX.require_framework '/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework'
include OSX
$d=File.basename Dir.pwd
Dir.chdir '..'
fsevents_cb = proc do |stream, ctx, numEvents, paths, marks, eventIDs|
system "rsync --delete -rt --rsh=ssh '#{$d}' 'methylblue.com:public_html/'"