Skip to content

Instantly share code, notes, and snippets.

@ahomu
ahomu / grunt-yslow.js
Created November 22, 2012 08:13
WIP: HARを取得して、Yslowで評価するぞくん
module.exports = function(grunt) {
'use strict';
var TEMP_HAR_RESOURCE = '.har.tmp';
var exec = require('child_process').exec,
YSLOW = require('yslow').YSLOW,
doc = require('jsdom').jsdom(),
util = grunt.utils || grunt.util,
@jasoncodes
jasoncodes / vim_tips.markdown
Last active December 21, 2015 00:08
Vim Tips

Vim Tips

fresh

Build your dotfiles (shell, Vim config) from multiple sources with fresh.

Both of our dotfiles are built using fresh. We source Vim and other config from each other:

@jgsqware
jgsqware / hosts.conf
Created November 10, 2015 13:11
Docker: Update your hosts with docker-machine ips automatically
# Pattern
# <docker-machine name>=<host name>,<host name>,...
registry=docker-registry
@MicahChalmer
MicahChalmer / .htaccess
Last active May 1, 2016 16:49
Scripts to set up Ruby 1.9.3 on a DreamHost shared hosting account via rbenv and ruby-build, and run a Rack app with it via FastCGI.
<IfModule mod_fastcgi.c>
AddHandler fastcgi-script .fcgi
</IfModule>
<IfModule mod_fcgid.c>
AddHandler fcgid-script .fcgi
</IfModule>
Options +FollowSymLinks +ExecCGI
RewriteEngine On
@wicz
wicz / bootstrap.sh
Created April 9, 2013 13:28
Configuration files and scripts for the blog post: Faster Rails 3 deployments to AWS Elastic Beanstalk http://horewi.cz/faster-rails-3-deployments-to-aws-elastic-beanstalk.html
#!/usr/bin/env bash
mkdir /var/app/ondeck/vendor /var/app/ondeck/public /var/app/support/bundle /var/app/support/assets /var/app/support/cache
ln -s /var/app/support/bundle /var/app/ondeck/vendor
ln -s /var/app/support/assets /var/app/ondeck/public
ln -s /var/app/support/cache /var/app/ondeck/vendor
sed -i 's/"rake/"bundle exec rake/' /opt/elasticbeanstalk/hooks/appdeploy/pre/11_asset_compilation.sh
@jrmoran
jrmoran / Cakefile
Created December 30, 2011 01:44
Cakefile to document, compile, join and minify CoffeeScript files for client side apps.
# Cakefile to document, compile, join and minify CoffeeScript files for
# client side apps. Just edit the config object literal.
#
# -jrmoran
fs = require 'fs'
{exec, spawn} = require 'child_process'
# order of files in `inFiles` is important
config =
@sindresorhus
sindresorhus / markdown-preview-mou.md
Created June 5, 2012 07:34
How to write your Markdown in Sublime Text 2 and preview in Mou

How to write your Markdown in Sublime Text 2 and preview in Mou

I use Sublime for everything text related, but it doesn't have any built-in way to preview my Markdown files.

This is how easy it is to preview in Mou:

  • In Sublime, go to Tools -> Build System -> New Build System...
  • In the newly opened file, replace the file contents with this and save: { "osx": {
@bhauman
bhauman / README.md
Last active December 3, 2019 16:43
ClojureScript minimal dev and prod setup.

Recent improvements to the ClojureScript compiler have greatly simplified setting up development versus production outputs.

This example uses Figwheel as something that you want to exclude for production, but the pattern is general.

With this simple setup you only need one html file/view and it will work for developement and production.

@andrewchilds
andrewchilds / gist:11831dc82093e53d41af
Last active September 10, 2021 16:22
Rollbar RQL Cheat Sheet
# List users by average and maximum session length.
SELECT person, max(client.runtime_ms), avg(client.runtime_ms)
FROM item_occurrence
GROUP BY 1
ORDER BY 2 DESC
# List active date ranges for each deploy.
SELECT client.javascript.code_version, min(timestamp), max(timestamp)
FROM item_occurrence
GROUP BY 1