Skip to content

Instantly share code, notes, and snippets.

@simeonwillbanks
simeonwillbanks / Gruntfile.js
Last active December 18, 2015 16:19
Use #HAML within a #yeoman #AngularJS app.
'use strict';
var lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet;
var mountFolder = function (connect, dir) {
return connect.static(require('path').resolve(dir));
};
module.exports = function (grunt) {
// load all grunt tasks
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active October 25, 2024 12:37
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@psyho
psyho / index.html
Created August 3, 2011 16:44
inline edit and dirty detection
<!DOCTYPE HTML>
<html xmlns:ng="http://angularjs.org">
<head>
<title>Inline Edit</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.js" type="text/javascript"></script>
<script src="http://code.angularjs.org/0.9.18/angular-0.9.18.min.js" type="text/javascript" ng:autobind></script>
<style type="text/css">
.dirty {
@mikem
mikem / pre_commit_hook-jammit
Created March 9, 2011 12:18
git pre-commit hook for Jammit
#!/usr/bin/env ruby
require 'jammit'
print "Jammit check... "
status_before = %x[git status --porcelain --untracked-files=no]
Jammit.package!
status_after = %x[git status --porcelain --untracked-files=no]
jammit_files = (status_after.split("\n") - status_before.split("\n")).map { |f| f.split[1] }
unless jammit_files.empty?