Skip to content

Instantly share code, notes, and snippets.

@digitaljhelms
digitaljhelms / post-rewrite
Last active Jan 4, 2017
Git hook to call `bower install` and `npm install` automatically.
View post-rewrite
#!/bin/sh
echo "[post-rewrite hook: $1]"
# by noahgrant & digitaljhelms
#
# quick script to call "bower install" and "npm install" automatically if
# bower.json or package.json are changed, respectively
#
# this assumes one top-level file for each
View sass_converter.rb
module Jekyll
# Sass plugin to convert .scss to .css
#
# Note: This is configured to use the new css like syntax available in sass.
class SassConverter < Converter
safe true
priority :low
def setup
return if @setup
@digitaljhelms
digitaljhelms / README.MD
Created Nov 4, 2011 — forked from wynst/README.MD
A Thor Task to unwatch *all* Github watched repositories (excluding owned) and optionally export to delicious.
View README.MD

A Thor Task to unwatch all Github watched repositories (excluding owned) and optionally export to delicious.

Sorry Github, for I have sinned. I use the Watch feature as a bookmarker.

Install required gems:

gem install thor rest-client

Use it as such:

@digitaljhelms
digitaljhelms / img_coverage.rb
Created May 9, 2011 — forked from angelo/img_coverage.rb
finds unused image assets in a website project.
View img_coverage.rb
#!/usr/bin/env ruby
require 'fileutils'
files = Dir['**/*.{htm,html,shtml,php,css,js}']
images = Dir['**/*.{jpg,png,gif,bmp}']
puts "#{images.size} images found & #{files.size} files found to search against"
content = ""