Skip to content

Instantly share code, notes, and snippets.

@ryandotsmith
ryandotsmith / instruments.rb
Created April 6, 2012 07:09
Sequel & Sinatra Instrumentation
module Instruments
def self.set_logger(l, m)
@logger = l
@method = m
end
def self.logger
@logger
end
{
"auto_indent": true,
"auto_match_enabled": true,
"caret_style": "smooth",
"close_windows_when_empty": true,
"color_scheme": "Packages/Theme - Aqua/Color Schemes/Tomorrow Night Aqua.tmTheme",
"detect_indentation": true,
"dictionary": "Packages/Language - English/en_US.dic",
"draw_centered": false,
"draw_indent_guides": true,
@mattt
mattt / rocket.md
Created May 27, 2015 15:49
Rocket: a hybrid approach to real-time cloud applications

This document was originally posted on 8/1/2013.

Rocket is a technique for building real-time functionality on top of REST web services that leverages web standards like [Server-Sent Events][SSE] and [JSON Patch][RFC6902]. Most importantly, it fits comfortably with how you're already building applications.

A Tale of Two Paradigms

Just as light can act as both a particle and a wave, so information can be thought as both a document and a stream.

Each approach has its particular strengths and weaknesses:

@echo off
:: The quick-and-nasty CVE-2013-0156 Heroku inspector!
:: Originally brought to you by @elliottkember with changes by @markpundsack @ Heroku
:: This fork created by @aghilmort of @thoughtpuzzle for windows platforms
:: Download and run using:
:: cmd heroku-CVE-2013-0156.bat
:: alternatively, run next line from command line to check apps individually
@jclem
jclem / gifify.sh
Last active December 11, 2015 16:19
Shell script for turning .mov files into .gifs and posting to Cloudapp
#!/bin/bash
function printHelpAndExit {
echo 'Usage:'
echo ' gifify -coux filename'
echo ''
echo 'Options: (all optional)'
echo ' c CROP: The x and y crops, from the top left of the image, i.e. 640:480'
echo ' o OUTPUT: The basename of the file to be output (default "output")'
echo ' u: Upload the resulting image to CloudApp'
@geemus
geemus / heroku.md
Created October 12, 2011 22:17
heroku style guide

TODO empty arrays and/or nil values (see apps:info)

General Guidelines

  • Use full sentences, including punctuation.
  • Labels should be provided where needed in the form of 'Labels labels:'.
  • Commands should have one newline between the header and body and another after the body.
  • Alpha-sort arrays before display and display labeled data in alpha-sorted key order.
@ffub
ffub / gist:1084424
Created July 15, 2011 10:10
Balsamiq HTML export
#!/usr/bin/php
<?php
error_reporting(E_ALL);
if (count($argv) <= 1) {
print("usage createMockup src_dir dst_dir images_dir\n");
print("\tsrc_dir : dir where all bmml file are\n");
print("\tdst_dir : dir where write all html files\n");
print("\timages_dir : dir where all export mockup png are (will be copied to the \$dst_dir/images directory)\n");
exit(1);
}
@raulb
raulb / gist:5251844
Last active August 21, 2018 14:51
English is hard

ENGLISH IS FOGGING HARD

Let's face it. I'm not the Queen Elizabeth in what concerns to speak English. But ey! (hey!), just help me. I know you wanted to tell me: "Idiot, it's not like that", now you have your chance. Add your comments/pr/merges/forkes/... here and contribute to the cause of why I am paying a psychologist every month (also, can you recommend me someone?)

I wrote (it is)

  • It should works (It should work)
  • Looks fine for you (Looks fine to you)
  • Dial you (Dial you in)
  • Oyster egss (Easter eggs)