Skip to content

Instantly share code, notes, and snippets.

View benvium's full-sized avatar

Ben Clayton benvium

  • Bristol, UK
View GitHub Profile
benvium / resizer.txt
Last active September 3, 2018 13:30 — forked from gingertom/
Resize all @3x images in a folder to @2x and @1x sizes. Using this script you need only ever edit the @3x images. Drop this script into the folder containing your images and double-click it in Finder to run. Note it will destructively overwrite the @2x and @1x-sized images, so be careful. Don't run this script in a folder that's not under versio…
#!/bin/bash -e
# Ensure we're running in location of script.
cd "`dirname $0`"
for f in *; do
if [[ $f == *@3x* ]];
echo "$f -> ${f//@3x/@2x}, ${f//@3x/}"
convert "$f" -resize 66.66666% "${f//@3x/@2x}"
benvium / 0_reuse_code.js
Created August 21, 2014 11:01
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console