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
/* | |
* Steps | |
* 1. Rename your gulpfile.js to gulpfile.babel.js | |
* 2. Add babel to your package.json (npm install -D babel) | |
* 3. Start writing ES6 in your gulpfile! | |
*/ | |
import gulp from 'gulp'; // ES6 imports! | |
import sass from 'gulp-sass'; | |
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
tell application "Google Chrome" | |
set tab_list to every tab in the front window | |
repeat with the_tab in tab_list | |
set the_url to the URL of the_tab | |
tell application "Safari" to open location the_url | |
end repeat | |
end tell |
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
{% macro input(name, value, type, attributes) %} | |
<input name="{{ name }}" type="{{ type }}" value="{{ value }}"{% for attr, value in attributes %} {{ attr }}="{{ value }}"{% endfor %}{% if not attributes.id is defined %} id="{{ name }}"{% endif %}/> | |
{% endmacro %} | |
{% macro text(name, value, attributes) %} | |
{% from _self import input %} | |
{{ input(name, value, "text", attributes) }} | |
{% endmacro %} | |
{% macro password(name, value, attributes) %} |
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
<html> | |
<!-- ... --> | |
<!-- Embed analytics.js as local file --> | |
<script src="/analytics.js"></script> | |
</html> |
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
# Execute within the folder where pictures are located. | |
# This command will create a directory hierarchy by year/year-month | |
sudo apt-get install libimage-exiftool-perl | |
exiftool -d %Y/%Y-%m/%Y-%m-%d-%H:%M:%S.%%e "-filename<datetimeoriginal" -r . | |
# See more | |
# http://ninedegreesbelow.com/photography/exiftool-commands.html#move |
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
// Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication | |
// http://creativecommons.org/publicdomain/zero/1.0/ | |
// HTML files: try the network first, then the cache. | |
// Other files: try the cache first, then the network. | |
// Both: cache a fresh version if possible. | |
// (beware: the cache will grow and grow; there's no cleanup) | |
const cacheName = 'files'; |
OlderNewer