Skip to content

Instantly share code, notes, and snippets.

View andredublin's full-sized avatar
🐝
buzz

Andre Dublin andredublin

🐝
buzz
View GitHub Profile
@andredublin
andredublin / cloud.css
Created October 4, 2011 22:44
Updated animation script
.bkgEnvi {
position: relative;
z-index: 1;
}
.moveCloud {
position: absolute;
top: 10px;
right: 50px;
z-index: 5;
}
@andredublin
andredublin / html5-data.js
Created November 23, 2011 14:46 — forked from remy/html5-data.js
data-* support
(function () {
var forEach = [].forEach,
regex = /^data-(.+)/,
dashChar = /\-([a-z])/ig,
el = document.createElement('div'),
mutationSupported = false,
match
;
function detectMutation() {
@andredublin
andredublin / gist:1487289
Created December 16, 2011 18:33 — forked from JeffreyWay/gist:1486709
Autosave CSS from Chrome
Autosave from Chrome Notes:
Watch: http://addyosmani.com/blog/autosave-changes-chrome-dev-tools/
Installation Instructions: https://github.com/NV/chrome-devtools-autosave
Afraid of Node? Here's a one-click install: https://sites.google.com/site/nodejsmacosx/
To monitor changes, you have to run `node chrome-devtools-autosave-server/index.js` in the Terminal. This is hard to remember,
so create an alias. Run
@andredublin
andredublin / workflow.rb
Created December 19, 2011 22:20
Heroku + Rails Generator
gem("thin")
gem("bcrypt-ruby", version:"~> 3.0.0")
gem("heroku")
gem("gravatar_image_tag")
gem("kaminari")
gem("bourbon", group: 'assets')
gem("annotate", group: 'development', :git => 'git://github.com/ctran/annotate_models.git')
gem("ffaker", group: 'development')
if yes?("Would like to install Zurb Foundation?")
@andredublin
andredublin / gist:2236575
Created March 29, 2012 12:00 — forked from babelian/gist:982801
dynanic mass assign
class Project < ActiveRecord::Base
class << self
def always_attributes
%w{attributes anybody can edit}
end
def draft_attributes
%w{available only while project is being written}
class PostsController < ActionController::Base
def create
Post.create(post_params)
end
def update
Post.find(params[:id]).update_attributes!(post_params)
end
private
@andredublin
andredublin / gist:2482541
Created April 24, 2012 18:45 — forked from luetkemj/wp-query-ref.php
WP: Query $args
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php
*/
$args = array(
@andredublin
andredublin / style.css
Created April 25, 2012 11:15 — forked from luetkemj/style.css
WP-CSS: Wordpress classes
/* =============================================================================
WordPress WYSIWYG Editor Styles
========================================================================== */
.entry-content img {
margin: 0 0 1.5em 0;
max-width: 100%;
height: auto;
}
.alignleft, img.alignleft {
@andredublin
andredublin / more.md
Created May 1, 2012 19:34 — forked from vasilisvg/more.md
This is my backup script which syncs my server to my dropbox every day.

The script below is triggered every day from my Mac. I use Hazel to move the tar.gz to an external hard disk once it's finished. This happens every day without me noticing.

You should have a similar script.

@andredublin
andredublin / nginx_rails_3_1
Created May 25, 2012 04:25 — forked from shapeshed/nginx_rails_3_1
Nginx Config for Rails 3.1 with Unicorn and Asset Pipeline
upstream app {
server unix:/srv/app/current/tmp/sockets/unicorn.sock fail_timeout=0;
}
server {
listen 80;
server_name www.app.com;
rewrite ^/(.*) http://app.com/$1 permanent;
}
server {