Skip to content

Instantly share code, notes, and snippets.

View jacine's full-sized avatar
😁

Jacine Luisi jacine

😁
View GitHub Profile
@moonray
moonray / .bash_profile
Created October 29, 2010 18:29
p and d functions to use in .bash_profile
function p {
wget -O tmp.patch $1; patch -p0 < tmp.patch; d tmp.patch;
}
function d {
# cvs diff -upNF^f . > $1.patch
git diff --no-prefix HEAD . > $1.patch;
# Clean up to avoid possible issues.
rm -f $1.tmp.patch
@moonray
moonray / skins.inc.php
Created October 29, 2010 20:17
A skinr include.
<?php
/**
* Implements hook_skinr_info().
*
* Define the API version of skin(s). This is required when creating a new skin.
* The theme or module version
*
* The "hook" prefix is substituted with the name of the module or theme that
* implements it, e.g. THEMENAME_PLUGINNAME_skinr_info(), or
@nathansmith
nathansmith / template.php
Created January 29, 2011 06:11
Drupal 7 HTML5 Minification
<?php
function THEMENAME_process_html(&$variables) {
if (!empty($variables)) {
$css_before = array(' type="text/css"', ' media="all"');
$css_after = array('', '');
$js_before = array(' type="text/javascript"', '<!--//--><![CDATA[//><!--', '//--><!]]>');
$js_after = array('', '', '');
@nathansmith
nathansmith / moz-webkit.css
Created March 22, 2011 01:51
Target Firefox and WebKit via hacky CSS.
/*
Read more here:
https://developer.mozilla.org/en/CSS/@-moz-document
For more browser-specific hacks:
http://paulirish.com/2009/browser-specific-css-hacks
*/
@-moz-document url-prefix() {
/* Put your Firefox specific code here. */
@mirisuzanne
mirisuzanne / tutorial.mkdn
Created August 22, 2011 20:37
A new Susy tutorial

Susy 0.9 Tutorial

See the official Susy site for 1.0 documentation.

For this tutorial I'm assuming you are already comfortable with CSS, Sass (I'll use the SCSS syntax) and Compass. Please get set up with each one of those before attempting to use Susy. Sass and Compass both have their own setup instructions and tutorials that you can use.

There is also reference documentation in the works.

Building a Susy Grid

@mirisuzanne
mirisuzanne / reference.mkdn
Created August 22, 2011 23:34
Susy 0.9 Reference Documentation

Susy 0.9 Reference Documentation

See the official Susy site for 1.0 documentation.

Terms

  • Susy Grid: A grid that you build with Susy. You can have multiple on one page if you need.
  • Grid Element: Any HTML element that is aligned to a Susy Grid.
  • Container: The root element in a Susy Grid. Anything inside it is a potential Grid Element.
@chriseppstein
chriseppstein / 0_selector_hacks.scss
Created September 14, 2011 04:27
This gist demonstrates some uses of the new sass feature: Passing content blocks to mixins.
@mixin ie6 { * html & { @content } }
#logo {
background-image: url("/images/logo.png");
@include ie6 { background-image: url("/images/logo.gif"); }
}
@jacine
jacine / .htaccess
Created December 1, 2011 23:10
My favorite Drupal trick for local theme development
# Find this line and insert the code below it (adapted to use your sitename/server).
# RewriteBase /
# Use files on the dev server instead of syncing them locally.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^sites/sitename/(files/.*)$ http://dev.whatever.com/sites/sitename/$1 [L,QSA]
exclude = "{*.{o,pyc},Icon\r,CVS,_darcs,_MTN,\{arch\},blib,*~.nib,vendor,*.log,tmp,log,coverage,coverage.data}"
include = "{.tm_properties,.htaccess,.rvmrc,.gitignore}"
#
# TM_HG = "/opt/local/bin/hg"
# TM_GIT = "/opt/local/bin/git"
#
# [ "/usr/include/{**/,}*" ]
# tabSize = 2
# softTabs = true
#
@mirisuzanne
mirisuzanne / pushpull.sass
Created December 14, 2011 20:42
push and pull for susy
@function move($n,$context:false)
$move: columns($n,$context) + gutter($context)
@return $move
=push($n,$c:false)
$sg: side-gutter()
@if $c
$sg: 0
margin-left: $sg + move($n,$c)