Skip to content

Instantly share code, notes, and snippets.

View tomByrer's full-sized avatar
🎦
researching video players

Tom Byrer tomByrer

🎦
researching video players
View GitHub Profile
@lzcabrera
lzcabrera / steps
Last active August 29, 2015 14:06
woff2 font-compression
*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
@fcamblor
fcamblor / README.md
Last active January 11, 2023 06:46 — forked from tamadamas/README.md

agnoster-fcamblor.zsh-theme

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

@masak
masak / git-edit-commit
Created June 11, 2014 11:51
A git-edit-commit subcommand
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
@sergejmueller
sergejmueller / ttf2woff2.md
Last active March 9, 2024 13:37
WOFF 2.0 – Learn more about the next generation Web Font Format and convert TTF to WOFF2
@Naatan
Naatan / auto-braces.js
Created May 7, 2014 17:39
Komodo IDE - Auto Braces
/**
* @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}
@Hodapp87
Hodapp87 / jpeg_split.c
Last active December 27, 2017 02:10
Write each scan from a multi-scan/progressive JPEG.
// 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,
@gitaarik
gitaarik / git_submodules.md
Last active April 13, 2025 18:24
Git Submodules basic explanation

Git Submodules basic explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:

  • Separate big codebases into multiple repositories.
#!/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:
@larrybotha
larrybotha / A.markdown
Last active November 21, 2024 08:06
Fix SVGs not scaling in IE9, IE10, and IE11

Fix SVG in <img> tags not scaling in IE9, IE10, IE11

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.

Use sed in bash to remove width and height attributes in SVG files

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)