Skip to content

Instantly share code, notes, and snippets.

@activestylus
activestylus / gist:f827f8d249545af614e3
Created October 11, 2014 16:51
MithrilJS Best Practices
var app = {};
//model
app.PageList = function() {
var pages = m.prop([]);
var url = "pages.json";
return m.request({method: "GET", url: url}).then(pages);
};
// view model
require 'rubygems'
require 'bundler'
Bundler.setup(:default, :development)
require 'lotus'
Lotus::Controller.configure do
modules do
include Music::Helpers
end
end
#dropbox {
position: relative;
}
#dropbox > input {
position: absolute;
top: 0px;
right: 0px;
bottom: 0px;
left: 0px;
nil
############################################################
$ rvm info
ruby-1.9.2-p290:
system:
uname: "Darwin home.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386"
bash: "/bin/bash => GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0)"
zsh: "/bin/zsh => zsh 4.3.9 (i386-apple-darwin10.0)"
@activestylus
activestylus / argh
Created March 30, 2011 09:47
whatever
We couldn’t find that file to show.
#! /bin/sh
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the nginx web server
# Description: starts nginx using start-stop-daemon
@activestylus
activestylus / template_git.rb
Created January 18, 2010 17:18
Rails 3 Template: Git Setup
#----------------------------------------------------------------------------
# Git Setup
#----------------------------------------------------------------------------
file '.gitignore', <<-FILE
.DS_Store
log/*.log
tmp/**/*
config/database.yml
db/*.sqlite3
public/uploads/*
// Prototype for Sass Form Styling
// Built atop RMS-Forms Framework
// http://www.rmsjr.com/blog/web-design/rmsforms-a-flexible-tableless-css-forms-framework/
// Still very rough around the edges!
//--------------------------------------------------------
// Form Defaults
//--------------------------------------------------------
form
:margin 0