Skip to content

Instantly share code, notes, and snippets.

@jayj
jayj / flexbox.less
Last active June 23, 2024 01:14
CSS3 Flexbox - LESS Mixins
// --------------------------------------------------
// Flexbox LESS mixins
// The spec: http://www.w3.org/TR/css3-flexbox
// --------------------------------------------------
// Flexbox display
// flex or inline-flex
.flex-display(@display: flex) {
display: ~"-webkit-@{display}";
display: ~"-ms-@{display}box"; // IE10 uses -ms-flexbox
@benkaiser
benkaiser / wmiirc
Last active December 13, 2015 23:49
My wmiirc (WMII configuration file)
#!/bin/dash -f
# Configure wmii
wmiiscript=wmiirc # For wmii.sh
. wmii.sh
# Configuration Variables
MODKEY=Mod1
UP=k
DOWN=j
@ryantbrown
ryantbrown / gulp-resize-and-minify-images.js
Last active August 30, 2022 14:07
Gulp - Resize and Optimize / Minify Images
/**
* Make sure Graphicsmagick is installed on your system
* osx: brew install graphicsmagick
* ubuntu: apt-get install graphicsmagick
*
* Install these gulp plugins
* glup, gulp-image-resize, gulp-imagemin and imagemin-pngquant
*
* Group images according to their output dimensions.
* (ex: place all portfolio images into "images/portfolio"
@fungiboletus
fungiboletus / cozy-docker.sh
Created February 8, 2016 18:22
Cozy docker
# you should have nginx-proxy and letsencrypt-nginx-proxy-companion
# https://github.com/jwilder/nginx-proxy
# https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion
# Then, start cozy/full
docker run -d --name cozy-cloud \
-e VIRTUAL_HOST=cozy.example.net \
-e LETSENCRYPT_HOST=cozy.example.net \
-e LETSENCRYPT_EMAIL=postmaster@example.net \
@squallstar
squallstar / viewer.html
Created January 26, 2017 21:20
Pinch gestures for pdf.js
<script type="text/javascript">
var gesturesSetUp = false;
var ua = navigator.userAgent.toLowerCase();
var isAndroid = ua.indexOf("android") > -1;
document.addEventListener('textlayerrendered', function (e) {
if (gesturesSetUp || e.detail.pageNumber !== PDFViewerApplication.page) {
return;
}