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 / 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 / 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(
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: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}
@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: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 / 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 / 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;
}