Skip to content

Instantly share code, notes, and snippets.

View killtheliterate's full-sized avatar

Garrett Dawson killtheliterate

View GitHub Profile
@pixelwhip
pixelwhip / _l-3up.scss
Created July 7, 2013 23:57
Drupal cTools/panels custom layout. Creating dynamic layout classes based on whether or not regions have content.
//
// @file
// Sidebars After Layout.
// One main content area with two sidebars after.
// ----------------------------------------------------------------------------
.l--3up {
@include breakpoint(41em, $no-query: '.lt-ie9') {
.l-main {
@include zen-grid-item(8, 1);
@jonschlinkert
jonschlinkert / markdown-cheatsheet.md
Last active April 11, 2024 04:45
A better markdown cheatsheet.
@igstan
igstan / option.js
Last active December 18, 2015 05:49
// `unit` is `return` from Haskell
// `bind` is `>>=` from Haskell, or `flatMap` from Scala
var None = {
bind: function (fn) { return this; },
unit: function (v) { return Option(v); },
getOrElse: function (elseValue) { return elseValue; }
};
var Some = function (value) {
mymodule {
@at-root {
.#{&}-header { ... }
.#{&}-footer { ... }
.#{&}-body {
a { ... }
span { ... }
p { ... }
}
}
@cobyism
cobyism / gh-pages-deploy.md
Last active May 25, 2024 08:30
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@topfunky
topfunky / CHANGES.md
Created August 2, 2012 18:27
Express 3.0 Changes

Changes in Express 3.0 Templates

Related: PeepCode Full Stack Node.js screencast (an included code sample works with Express 3.0).

There are several syntax changes in Express 3.0. They do require modifications to your code, but they aren't too complicated.

The biggest change is that Express templates now use Django style inheritance rather than ERB/Rails style automatic layouts.

Summary

@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@thulstrup
thulstrup / compass-retina-sprites.scss
Created March 20, 2012 19:18
Using Compass to generate normal and retina sprite maps
$sprites: sprite-map("sprites/*.png");
$sprites-retina: sprite-map("sprites-retina/*.png");
@mixin sprite-background($name) {
background-image: sprite-url($sprites);
background-position: sprite-position($sprites, $name);
background-repeat: no-repeat;
display: block;
height: image-height(sprite-file($sprites, $name));
width: image-width(sprite-file($sprites, $name));
@ebinnion
ebinnion / hideMenu.js
Created January 24, 2012 05:12
Jquery Hide/Show Menu Responsive Web Design
$('#menu-button').click(function(){
$('.menu').slideToggle('fast',function() {});
});
function menuHide (){
if ($(window).width() < 1024){
$("body").addClass("mobile");
}
else {
$("body").removeClass("mobile");
@gnarf
gnarf / example.js
Created June 1, 2011 23:53
$.fn.newContent
// $.fn.newContent behaves kinda like .live(), it will act on elements that match the
// selector now, or in the future... It automatically runs on any elements immediately
// matched, and also runs once on document ready. You then call .newContent() on any
// freshly created content to trigger searching it
// It will call the given callback function in the context of a
// jQuery set that matches the selector...
$("li.test").newContent(function() {
this.css("color", "red");