Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am jmif on github.
  • I am jmif (https://keybase.io/jmif) on keybase.
  • I have a public key ASAKQqkc9vYmaW2qsZJLFW06UsFc4LY66yELSXwr8zG3hQo

To claim this, I am signing this object:

nestedView("JS Pipelines") {
views {
build_pipelines.each {
def build_pipeline = it
buildPipelineView(build_pipeline.build_name + " JS Pipeline") {
selectedJob(build_pipeline.start_job)
}
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential
apt-get -y install git-core
# Install rbenv
git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv
# Add rbenv to the path:
select('d1.*, d2.*, ST_INTERSECTION(d1.shape, d2.shape) AS intersection')
.from('data d1')
.joins('JOIN data d2 ON ST_INTERSECTS(d1.shape, d2.shape)')
.where { d1.batch_id == batch }
.where { d2.batch_id == batch }
@jmif
jmif / gist:5757601
Last active December 18, 2015 08:59
application "manage" do
path node[:manage][:docroot]
owner node[:apache][:user]
group node[:apache][:user]
repository node[:manage][:repo]
deploy_key node[:manage][:deploy_key]
php do
database_master_role 'mysql'
@jmif
jmif / gist:4615274
Last active December 11, 2015 14:38
Resque::Job.create('jobs', QuickJob)
Resque::Job.create('jobs', QuickJob)
w1 = Resque::Worker.new('*')
w2 = Resque::Worker.new('*')
w1.work(0) do.
w2.work(0) do.
4.should == 3
end
end
@jmif
jmif / login_form.js
Created April 22, 2012 18:47
Twitter Bootstrap Login Form JavaScript
$(function() {
// Setup drop down menu
$('.dropdown-toggle').dropdown();
// Fix input element click problem
$('.dropdown input, .dropdown label').click(function(e) {
e.stopPropagation();
});
});
@jmif
jmif / login_form.html
Created April 22, 2012 18:47
Twitter Bootstrap Navbar Login Form HTML
<form action="[YOUR ACTION]" method="post" accept-charset="UTF-8">
<input id="user_username" style="margin-bottom: 15px;" type="text" name="user[username]" size="30" />
<input id="user_password" style="margin-bottom: 15px;" type="password" name="user[password]" size="30" />
<input id="user_remember_me" style="float: left; margin-right: 10px;" type="checkbox" name="user[remember_me]" value="1" />
<label class="string optional" for="user_remember_me"> Remember me</label>
<input class="btn btn-primary" style="clear: left; width: 100%; height: 32px; font-size: 13px;" type="submit" name="commit" value="Sign In" />
</form>
@jmif
jmif / navbar.html
Created April 22, 2012 18:46
Twitter Bootstrap Navbar HTMl
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container"><!-- Collapsable nav bar -->
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<!-- Your site name for the upper left corner of the site -->
@jmif
jmif / application_controller.rb
Created April 22, 2012 18:33
Rails Two Legged OAuth before_filter
require 'rack'
require 'rack/request'
require 'oauth'
class ApplicationController < ActionController::Base
before_filter :run_oauth_check
# ...
protected
def run_oauth_check