Skip to content

Instantly share code, notes, and snippets.

View thedaviddias's full-sized avatar
🌍

David Dias thedaviddias

🌍
View GitHub Profile

Yeoman + Compass Sprites

Setup

generator-webapp has support for compass out of the box. However, in order to use one of my favorite features of it — sprites and the image_url helper — you have to make some adjustments to the Gruntfile.

Let's assume you use a SASS stylesheet like this one:

@import "design/*.png"
#!/usr/bin/env ruby -wKU
# -*- coding: utf-8 -*-
# Adapted from Brett Terpstra’s original “Markdown to Evernote” service (http://brettterpstra.com/a-better-os-x-system-service-for-evernote-notes-with-multimarkdown/)
# Martin Kopischke 2011 – License: Creative Commons Attribution Share-Alike (CC BY-SA) 3.0 Unported (http://creativecommons.org/licenses/by-sa/3.0/)
# Changes: – support for setting the creation date with 'Date:' MMD metadata attribute
# – create only one Evernote note per (Multi)Markdown input passed (instead of one per line)
# – do not choke on shell escape characters (use Tempfile instead of shell pipe for osascript)
# – default to MultiMarkdown 3 executable (instead of MMD 2 Perl script)
# – make smart typography processing optional (set SMARTY to 'false' to bypass processing;
@nhoizey
nhoizey / index.html
Created September 13, 2011 12:47
Un affichage de numéro vert avec Microformat et mise en forme en CSS
<!-- Live demo : http://bl.ocks.org/1213727 -->
<html>
<head>
<title>Un affichage de numéro vert avec Microformat et mise en forme en CSS</title>
<link rel="stylesheet" media="all" href="numero_vert.css" type="text/css" />
</head>
<body>
<span class="vcard numerovert">
<span class="fn">Nom de la société</span>
@mmodrow
mmodrow / frontendchecklist.io-persist.js
Last active December 15, 2017 09:21
Adds load and save feature on the command line for carrying state on https://frontendchecklist.io beyond browser sessions
// ==UserScript==
// @name The Front-End Checklist Persistator
// @namespace http://tampermonkey.net/
// @version 0.1
// @description load and store data put into "The Front-End Checklist"
// @author Marc Modrow
// @match https://frontendchecklist.io
// @grant none
// ==/UserScript==
innerWidth / innerHeight tests @ http://sandbox.thewikies.com/orientation/
--------------------------------------------------------------------------------
Tested (14 devices, 28 browsers):
Droid 2 Global Android 2.2
iPhone 4 iOS5 (Safari, Opera Mini)
Motorola Atrix Android 2.3.4 (Stock browser, Dolphin, Skyfire, Opera Mini, Firefox)
Samsung Galaxy S9000 Android 2.3 (Webkit, Opera Mobile)
Samsung Galaxy Y Android 2.3.5
@mygeekdaddy
mygeekdaddy / OmniFocus_Due_List.scpt
Created July 3, 2015 21:22
Generate MD file for tasks due within +/- 7d of current date
(*
File: OmniFocus_Due_List.scpt
Revision: 1.0
Revised: 2015-07-01
Summary: Create taskpaper list of tasks due +/- 7d from current date.
-----------------------------------------------------------
Script based on Justin Lancy (@veritrope) from Veritrope.com
@marijn
marijn / README.markdown
Last active October 1, 2023 13:42
List of countries in YAML, CSV and TXT format
var application_root = __dirname,
express = require("express"),
path = require("path"),
mongoose = require('mongoose');
var app = express.createServer();
// database
mongoose.connect('mongodb://localhost/ecomm_database');
@chad3814
chad3814 / gist:2924672
Last active January 16, 2024 20:27
deleting array items in javascript with forEach() and splice()
// This is from my comment here: http://wolfram.kriesing.de/blog/index.php/2008/javascript-remove-element-from-array/comment-page-2#comment-466561
/*
* How to delete items from an Array in JavaScript, an exhaustive guide
*/
// DON'T use the delete operator, it leaves a hole in the array:
var arr = [4, 5, 6];
delete arr[1]; // arr now: [4, undefined, 6]
@mzabriskie
mzabriskie / README.md
Last active February 5, 2024 15:10
Check git status of multiple repos

If you're like me you have a dir like ~/Workspace/Github where all your git repos live. I often find myself making a change in a repo, getting side tracked and ending up in another repo, or off doing something else all together. After a while I end up with several repos with modifications. This script helps me pick up where I left off by checking the status of all my repos, instead of having to check each one individually.

Usage:

git-status [directory]

This will run git status on each repo under the directory specified. If called with no directory provided it will default to the current directory.