Skip to content

Instantly share code, notes, and snippets.

View manafire's full-sized avatar

Brad Carson manafire

View GitHub Profile
/* The Grid ---------------------- */
.lt-ie9 .row { width: 940px; max-width: 100%; min-width: 768px; margin: 0 auto; }
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.lt-ie9 .row.large-collapse .column,
.lt-ie9 .row.large-collapse .columns { padding: 0; }
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.lt-ie9 .row .row.large-collapse { margin: 0; }
.lt-ie9 .column, .lt-ie9 .columns { float: left; min-height: 1px; padding: 0 15px; position: relative; }
.lt-ie9 .column.large-centered, .columns.large-centered { float: none; margin: 0 auto; }
@davekonopka
davekonopka / Rakefile.rb
Last active June 22, 2016 04:42
WWW Rake file
namespace :site do
desc "Middleman build"
task :build do
puts "Building site..."
puts `bundle exec middleman build --verbose`
end
desc "Build, deploy, bust cache"
task :deploy => ["site:build", "s3:deploy", "fastly:bust_cache"]
@kidpixo
kidpixo / PostGIS 2.0 Cheatsheet.md
Last active October 11, 2024 11:14
PostGIS 2.0 Cheatsheet
@jkneb
jkneb / Gruntfile.js
Created July 24, 2013 16:48
grunt-ember-handlebars plugin config for the Gruntfile + package.json. You'll have to update the Gruntfile with YOUR correct path to templates files. 1. Run `npm install` 2. Run `grunt` or `grunt watch`
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON( 'package.json' ),
ember_handlebars: {
options: {
processName: function(filePath) {
var shortFilePath = filePath.replace(/assets\/js\/app\/templates\//, '').replace('.hbs', '');
return shortFilePath;
},
@connors511
connors511 / club.js
Last active December 20, 2015 22:19
module.exports = function() {
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
var _schema = new Schema({
name: { type: String, trim: true, required: true },
kitchen: { type: Schema.ObjectId, ref: 'Kitchen' },
users: [{
user: { type: Schema.ObjectId, ref: 'User' },
@ryansechrest
ryansechrest / post-receive.sh
Last active February 12, 2017 12:41
Git post-receive hook to deploy WordPress and plugins as submodules. It can also install Node.js modules with npm and vendor packages with Composer.
#!/bin/bash
# Created on 7/17/13 by Ryan Sechrest
# Deploys pushed branch from the origin repository to the web directory
if [[ (-n $1) && (-n $2) && (-n $3) ]]; then
# Set path to project directory
project_path="/var/www/domains/$2/$3"
@ryansechrest
ryansechrest / server-to-localhost.sh
Created December 23, 2013 07:40
Bash script to synchronize website directory and database between server and localhost or server and server.
#!/bin/bash
# Created on 10/8/13 by Ryan Sechrest
# site (localhost edition)
# Program to mirror a directory and database of a website between two servers.
### Program meta data
@justinweiss
justinweiss / filterable.rb
Last active January 30, 2025 13:06
Filterable
# Call scopes directly from your URL params:
#
# @products = Product.filter(params.slice(:status, :location, :starts_with))
module Filterable
extend ActiveSupport::Concern
module ClassMethods
# Call the class methods with names based on the keys in <tt>filtering_params</tt>
# with their associated values. For example, "{ status: 'delayed' }" would call
# config/routes.rb
resources :documents do
scope module: 'documents' do
resources :versions do
post :restore, on: :member
end
resource :lock
end
end
@manafire
manafire / gist:c385b40031309af1c9d6
Last active August 29, 2015 14:01
Ubuntu + rbenv + github + Rails + Ruby + nginx + passenger + ec2
# IN AMAZON EC2 SERVER #
########################
sudo su
apt-get -y update && apt-get -y upgrade
apt-get install vim git-core curl openssh-server openssh-client python-software-properties build-essential zlib1g-dev libssl-dev libreadline-gplv2-dev libcurl4-openssl-dev aptitude
/usr/sbin/groupadd wheel
/usr/sbin/visudo
(paste bottom)
%wheel ALL=(ALL) ALL