Skip to content

Instantly share code, notes, and snippets.

View bardware's full-sized avatar

Bernhard Döbler bardware

View GitHub Profile
@bardware
bardware / updgem.sh
Last active July 25, 2017 16:31
update ruby gems
gem update --system
gem update
# gem sources --clear-all
# gem sources --update
# gem install sass --version 3.4.25
# gem uninstall
sass --compass --style nested --line-numbers --line-comments --debug-info --trace --no-cache --force --stop-on-error --unix-newlines --update roboto.scss:roboto.css
@bardware
bardware / ttf2webfont.sh
Last active August 29, 2015 14:07
Convert a TTF font into WOFF, SVG and EOT format.
#!/bin/bash
# https://gist.github.com/rc1/5346303
# Convert a TTF font into WOFF, SVG and EOT format.
# @source: http://stackoverflow.com/a/2467452/179015
# @usage: ttf2webfont.sh FontName
woffFont="$1.woff"
svgFont_tmp="$1_tmp.svg"
svgFont="$1.svg"
ttfFont="$1.ttf"
eotFont="$1.eot"
Ember.Handlebars.helper('filesize', function(value) {
if (typeof value === 'undefined') {
return null;
}
var i,
filesize,
units = ['B', 'KB', 'MB', 'GB', 'TB'];
for (i = 0; i < units.length; i++) {
if (value < 1024) {
filesize = Math.floor(value) + units[i];