A ZSH theme optimized for people who use:
- Solarized
- Git
- Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)
For Mac users, I highly recommend iTerm 2 + Solarized Dark
*Download the reference codebase* | |
$ git clone https://code.google.com/p/font-compression-reference/ | |
*Build the project* | |
cd font-compression-reference/woff2 | |
make clean all | |
*Run the tool over a given font* | |
$ ./woff2_compress telusdings.ttf |
COMMIT="$1" | |
echo "${COMMIT:=HEAD}" | |
OLD_HEAD=`git rev-parse HEAD` | |
git reset --hard $COMMIT | |
git reset --mixed HEAD~ | |
git commit --patch || (git reset --hard $OLD_HEAD && exit) | |
git checkout . | |
git rebase -X theirs $OLD_HEAD |
Google Chrome Developers says:
The new WOFF 2.0 Web Font compression format offers a 30% average gain over WOFF 1.0 (up to 50%+ in some cases). WOFF 2.0 is available since Chrome 36 and Opera 23.
Some examples of file size differences: WOFF vs. WOFF2
/** | |
* @fileoverview Auto completes curly braces to start on a new line - experimental | |
* @author Nathan Rijksen | |
* @version 0.1 | |
*/ | |
/** | |
* Komodo Extensions Namespace. | |
* This namespace was suggested by JeffG. More information is available at: | |
* {@link http://community.activestate.com/forum-topic/extension-s-namespace} |
// jpeg_split.c: Write each scan from a multi-scan/progressive JPEG. | |
// This is based loosely on example.c from libjpeg, and should require only | |
// libjpeg as a dependency (e.g. gcc -ljpeg -o jpeg_split.o jpeg_split.c). | |
#include <stdio.h> | |
#include <jerror.h> | |
#include "jpeglib.h" | |
#include <setjmp.h> | |
#include <string.h> | |
void read_scan(struct jpeg_decompress_struct * cinfo, |
#!/bin/bash | |
mkdir tmp.$$ | |
for i in {0..9999}; do | |
echo ".x$i{color:green;}" | |
done > tmp.$$/main.scss | |
rm -rf .sass-cache | |
echo Sass: |
IE9, IE10, and IE11 don't properly scale SVG files added with img
tags when viewBox
, width
and height
attributes are specified. View this codepen on the different browsers.
Image heights will not scale when the images are inside containers narrower than image widths. This can be resolved in 2 ways.
As per this answer on Stackoverflow, the issue can be resolved by removing just the width
and height
attributes.
void function(){ | |
var p = require('combigreater') | |
var liberate = require('liberate') | |
var call = liberate(Function.prototype.call) | |
var slice = liberate(Array.prototype.slice) | |
var R = require('rationals') | |
var ZERO = R(0) | |
var ONE = R(1) |