This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
## split-image.sh - Split a large image into same-size tiles | |
## Split a large image into same-size tiles | |
## and optionally convert to a print-ready PDF document | |
## | |
## For example split a huge A1-size banner into 8x A4 tiles | |
## and create a single PDF ready for print. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// disable :hover on touch devices | |
// based on https://gist.github.com/4404503 | |
// via https://twitter.com/javan/status/284873379062890496 | |
// + https://twitter.com/pennig/status/285790598642946048 | |
// re http://retrogamecrunch.com/tmp/hover | |
// NOTE: we should use .no-touch class on CSS | |
// instead of relying on this JS code | |
function removeHoverCSSRule() { | |
if ('createTouch' in document) { | |
try { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%h1#headings Headings | |
%h1 Heading 1 | |
%h2 Heading 2 | |
%h3 Heading 3 | |
%h4 Heading 4 | |
%h5 Heading 5 | |
%h6 Heading 6 | |
%hr | |
%h1#headings-with-text Headings with Text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Warden::Manager.serialize_into_session{|user| user.id } | |
Warden::Manager.serialize_from_session{|id| User.get(id) } | |
Warden::Manager.before_failure do |env,opts| | |
# Sinatra is very sensitive to the request method | |
# since authentication could fail on any type of method, we need | |
# to set it for the failure app so it is routed to the correct block | |
env['REQUEST_METHOD'] = "POST" | |
end | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -name "node_modules" -exec rm -rf '{}' + | |
find . -name "bower_components" -exec rm -rf '{}' + | |
from https://coderwall.com/p/guqrca/remove-all-node_module-folders-recursively |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FB.Canvas.setSize({height:600}); | |
setTimeout("FB.Canvas.setAutoGrow()",500); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
//npm install gulp gulp-minify-css gulp-uglify gulp-clean gulp-cleanhtml gulp-jshint gulp-strip-debug gulp-zip --save-dev | |
var gulp = require('gulp'), | |
clean = require('gulp-clean'), | |
cleanhtml = require('gulp-cleanhtml'), | |
minifycss = require('gulp-minify-css'), | |
jshint = require('gulp-jshint'), | |
stripdebug = require('gulp-strip-debug'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mixin img | |
- | |
attributes.src = attributes.src || '' | |
attributes.alt = attributes.alt || "" | |
if(!attributes.adaptive && !attributes.webp && !attributes.retina) | |
img(src = attributes.src, class = attributes.class, alt = attributes.alt) | |
else | |
- | |
var chunks = attributes.src.split('.') |