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.
// 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, |
/** | |
* @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} |
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
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 |
*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 |
[alias] | |
recent = "!git for-each-ref --sort=-committerdate refs/heads/ --format='%(committerdate:short) %(refname:short)' | head -n 10" | |
co = checkout | |
cob = checkout -b | |
coo = !git fetch && git checkout | |
br = branch | |
brd = branch -d | |
brD = branch -D | |
merged = branch --merged | |
st = status |
############################################################################################################ | |
### % [ title ] ( src ) ### | |
video_matcher = /^%\[([^\]]*)\]\s*\(([^)]+)\)/ | |
#----------------------------------------------------------------------------------------------------------- | |
parse_video = ( state, silent ) -> | |
return false if state.src[ state.pos ] isnt '%' | |
match = video_matcher.exec state.src[ state[ 'pos' ] .. ] | |
return false unless match? | |
unless silent |
Before doing anything else, install those: