Skip to content

Instantly share code, notes, and snippets.

def alert(variable)
@variable = variable
def someothermailermethod(variable1, variable2, variable3)
@variable1, @variable2, @variable3 = variable1, variable2, variable3
<script type="text/javascript">
var pusher = new Pusher('f600b50f55a687b255c6');
var channel = pusher.subscribe('local_app_cache');
channel.bind('events_for_group_id_12345', function(data) {
n8 / gist:4677975
Last active December 11, 2015 23:38
This should be more like this
and this

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discussions around concrete examples, not handy-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

expired: "ha expirado, por favor pide una nueva"
not_found: "no encontrado"
already_confirmed: "ya fue confirmada. Intenta ingresar."
not_locked: "no ha sido bloqueada"
one: "Ha habido 1 error:"
other: "Han habido %{count} errores:"
/* ++++++++++++++++++ Highrise ( ------------------------------------------------------ */
/* ------------------ Main App Styles ----------------------------------------------------------------------- */
@font-face {
font-family: 'Highrise Open Sans';
font-style: normal;
font-weight: 400;
src: url("//") format("embedded-opentype"), url("//") format("woff2"), url("//") format("woff"), url("//") format("truetype"); }
@font-face {
font-family: 'Highrise Open Sans';
font-style: normal;
n8 / .js
Created March 17, 2016 16:37
var snapbackCache = SnapbackCache({
bodySelector: "mandatory selector of your infinite feed",
finish: function () {
optional method of something that needs to finish on your page before caching the page
removeAutofocus: function () {
optional method to kill autofocusing which screws with scrolling the page
refreshItems: function (dirtyThings) {
optional method to fetch fresh bits from your server you want to replace in the cache
n8 / .js
Created March 17, 2016 16:38
jQuery("#recordings").on("snapback-cache:loaded", function(e, cachedPage) {
// sets the pager to page from the appropriate place
EndlessPage.offset = cachedPage.nextPageOffset
var snapbackCache = SnapbackCache({
bodySelector: "#recordings"
jQuery(document).on("click", "body#recordings a", function (e) {
n8 / 1.html
Last active June 27, 2018 18:02
<div id='myAlert' style="background: #000; font-size: 2rem; color: #fff; padding: 2rem; display:none; line-height: 2.5rem">
<a href="#" style="float: right; color: #fff; text-decoration: none" onclick="hideAlert()">&times;</a>
We'll be offline at 9:00PM Central June 22 for database maintance. It should take 60 minutes at most.