Skip to content

Instantly share code, notes, and snippets.

@mattt
mattt / rocket.md
Created May 27, 2015
Rocket: a hybrid approach to real-time cloud applications
View rocket.md

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:

@raulb
raulb / gist:5251844
Last active Aug 21, 2018
English is hard
View gist:5251844

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)
@jclem
jclem / gifify.sh
Last active Dec 11, 2015
Shell script for turning .mov files into .gifs and posting to Cloudapp
View gifify.sh
#!/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'
View heroku_CVE_2013_0156.bat
@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
View Preferences.json
{
"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,
@ryandotsmith
ryandotsmith / instruments.rb
Created Apr 6, 2012
Sequel & Sinatra Instrumentation
View instruments.rb
module Instruments
def self.set_logger(l, m)
@logger = l
@method = m
end
def self.logger
@logger
end
@geemus
geemus / heroku.md
Created Oct 12, 2011
heroku style guide
View heroku.md

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 Jul 15, 2011
Balsamiq HTML export
View gist:1084424
#!/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);
}