Skip to content

Instantly share code, notes, and snippets.

View horacioh's full-sized avatar
💪
hustling

Horacio Herrera horacioh

💪
hustling
View GitHub Profile
@JedWatson
JedWatson / keystone.js
Created February 24, 2014 16:00
Example of how to integrate node-i18n with a KeystoneJS app (using yo keystone generated site as a basis) - see https://github.com/mashpie/i18n-node for more docs.
// Simulate config options from your production environment by
// customising the .env file in your project's root folder.
require('dotenv')().load();
// Require keystone and i18n
var keystone = require('keystone'),
i18n= require('i18n');
// Initialise Keystone with your project's configuration.
// See http://keystonejs.com/guide/config for available options
@dashed
dashed / gulpfile-env.js
Created January 7, 2014 12:38
Interesting and useful gulp snippets.
/*
From https://github.com/gulpjs/gulp/issues/101. Organize gulpfile.js using concept of environment variables.
1. Set up sub-tasks to behave in a certain according to env var; may be env agnostic.
2. Set up high-level tasks to run a group of sub-tasks to orchestrate a behaviour (testing, staging, prod, etc)
*/
var R = 0;
var ENV_SWITCH = void 0;
@bomberstudios
bomberstudios / sketch-plugins.md
Last active February 26, 2024 07:02
A list of Sketch plugins hosted at GitHub, in no particular order.
@ian-cox
ian-cox / .readme.md
Last active December 29, 2015 14:49
Vimeo/Youtube Kirbytext extension.

Vimeo/Youtube Kirbytext extension

Place this php file in the site/plugins folder of your kirby install. The plugin strips the video id from the end of both Vimeo and Youtube links.

Use the kirbytag like this:

(video: vimeo.com/79338229) (video: youtube.com/watch?v=0--NbrJX_xQ) (video: youtu.be/0--NbrJX_xQ)

@jedp
jedp / gist:3005816
Created June 27, 2012 18:18
postMessage() security review checklist

Security-Reviewing Uses of postMessage()

The postMessage() API is an HTML5 extension that permits string message-passing between frames that don't share the same origin. It is available in all modern browsers. It is not supported in IE6 and IE7.

postMessage is generally considered very secure as long as the programmer is careful to check the origin and source of an arriving

@burtlo
burtlo / Guardfile
Created March 11, 2012 15:41
HAML with YAML
guard 'shell' do
watch(/(.*).(?:haml|ya?ml)/) do |file|
haml_file = file.first.gsub(/ya?ml/,'haml')
html_file = file.first.gsub(/[yh]a?ml/,'html')
puts "Converting #{haml_file} to #{html_file}"
`haml #{haml_file} > #{html_file} --trace`
end
end