Skip to content

Instantly share code, notes, and snippets.

Kevin Smets kevin-smets

View GitHub Profile
kevin-smets /
Created Jun 12, 2013
mobile webkit landscape locking hack
$(window).bind("orientationchange", ->
$scope.orientation = window.orientation
width: $(window).width()
height: $(window).height()
if window.orientation % 180 is 0
rotation = "rotate(-90deg)"
if window.orientation > 0
kevin-smets /
Last active Sep 21, 2017
harp + browsers-sync, start developing for the web in under a minute (probably ;) )

What is this combo?

Static file server with livereload, preprocessors, synchronised testing over multiple browser instances and batteries included. This setup uses Harp and Browsersync, hence the name.


You will need node, install it if you haven't already.

Init all the things

kevin-smets /
Created Mar 1, 2015
Converts all sass files (recursively) to scss in a git repo (rename should get picked up so history is still tied to the converted file).
find . -type f -name "*.sass" -exec bash -c 'sass-convert ${0} -i --to scss; git mv ${0} ${0%.sass}.scss' {} \;
kevin-smets / csslint.clean.json
Last active Sep 21, 2017
CSS lint options for the modern browser(s)
View csslint.clean.json
"box-model" : true,
"display-property-grouping" : true,
"duplicate-properties" : true,
"empty-rules" : true,
"known-properties" : true,
"non-link-hover" : false,
"adjoining-classes" : false,
"box-sizing" : false,
"compatible-vendor-prefixes" : true,
kevin-smets /
Last active Sep 21, 2017
SemVer tagging
git tag -a v1.0.0 -m 'tagging v1.0.0'
git push --tags
kevin-smets /
Last active Oct 13, 2017
svgo all the things
# NO sudo
npm i -g svgo

# Go to a directory with svg's (also searches subdirectories)
find . -name '*.svg' -exec svgo -i {} \
kevin-smets /
Last active Oct 21, 2017
One liners for CLI asset servers

Https / Http2


macOS: brew install caddy

caddy --conf=<( echo -e ':8080\ntls self_signed' )

Make sure to use https://, otherwise you'll download a.. download file. Since it's self signed, you'll need to ignore any security warnings in order to continue.

View feed.en.json
"imageUrl": "",
"title": "Article 2",
"date": "20/02/2018",
"body": "Bacon ipsum dolor amet shankle drumstick tenderloin, leberkas tri-tip corned beef jowl. Short ribs cupim biltong, kielbasa filet mignon brisket sirloin prosciutto pork belly shank pig."
"title": "Article 1",
"date": "19/02/2018",
kevin-smets /
Last active Jun 4, 2018
Install TensorFlow @ MacOS


# Install python 3.x
brew ugrade python

# Install TF - see
pip3 install grpcio==1.9.1 tensorflow
for f in *.sass; do sass-convert $f ${f%sass}scss ; done
rm *.scss
You can’t perform that action at this time.