Skip to content

Instantly share code, notes, and snippets.

Working from home

Stefan Imhoff kogakure

Working from home
View GitHub Profile
kogakure / gulpfile.js
Created Aug 1, 2016 — forked from zhoujiealex/gulpfile.js
sample of gulpfile.js for hexo generate blog, compress public files
View gulpfile.js
/* Refrences:
var gulp = require('gulp');
var minifycss = require('gulp-clean-css');

ruby-1.9.3-p484 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p484 with the railsexpress patchsets:


You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.

View criticalcss-bookmarklet-devtool-snippet.js
(function() {
var CSSCriticalPath = function(w, d, opts) {
var opt = opts || {};
var css = {};
var pushCSS = function(r) {
if(!!css[r.selectorText] === false) css[r.selectorText] = {};
var styles =;(?![A-Za-z0-9])/);
for(var i = 0; i < styles.length; i++) {
if(!!styles[i] === false) continue;
var pair = styles[i].split(": ");
View date.format.js
* Date Format 1.2.3
* (c) 2007-2009 Steven Levithan <>
* MIT license
* Includes enhancements by Scott Trenda <>
* and Kris Kowal <>
* Accepts a date, a mask, or a date and a mask.
* Returns a formatted version of the given date.
View generator_scss.rb
# Jekyll Generator for SCSS
# (File paths in this description relative to jekyll project root directory)
# Place this file in ./_plugins
# Place .scss files in ./_scss
# Compiles .scss files in ./_scss to .css files in whatever directory you indicated in your config
# Config file placed in ./_sass/config.rb
require 'compass'
View config.rb
# Generate cache busters using the MD5 digest of files rather than the default
# `mtime`.
asset_cache_buster do |_, file|
View Gruntfile.js
'use strict';
module.exports = function(grunt) {
// load all grunt tasks
// configurable paths
var paths = {
# script for optimizing images in a directory (recursive)
# pngcrush & jpegtran settings from:
# pngcrush
for png in `find $1 -iname "*.png"`; do
echo "crushing $png ..."
pngcrush -rem alla -reduce -brute "$png" temp.png


Bootstrap 3.0 gives you access to the awesome icon set icon set by these dudes but it's not obvious for a Rails newbie like myself to get it all working together nicely


  1. Download the bootstrap-glyphicons.css from here. Save that file to RAILS_ROOT/vendor/assets/stylesheet/bootstrap-glyphicons.css
  2. Save all the font files in /dist/fonts from the Bootstrap 3.0 download to a new folder in your Rails app RAILS_ROOT/vendor/assets/fonts
  3. Add this folder to the asset pipeline by appending config.assets.paths << Rails.root.join("vendor","assets", "fonts") to application.rb after the line that has class Application < Rails::Application.
  4. In bootstrap-glyphicons.css modify the the url paths in @font-face to read /assets/FILE_NAME instead of `.
View dabblet.css
* (C)Leanest CSS spinner ever
@keyframes spin {
to { transform: rotate(1turn); }
.progress {
position: relative;