Skip to content

Instantly share code, notes, and snippets.

View mrkline's full-sized avatar
🐦
So it goes.

Matt Kline mrkline

🐦
So it goes.
View GitHub Profile
@naodesu
naodesu / gist:10620506
Created April 14, 2014 06:11
How to mount ubifs image in Linux.
# $UBIFS is ubifs image file
# make sure $IMAGE is a ubifs image file
blkid $(IMAGE)
$(IMAGE): ... TYPE="ubifs"
# size of created mtd is 256.0 MiB
modprobe nandsim first_id_byte=0x2c second_id_byte=0xda third_id_byte=0x90 fourth_id_byte=0x95
flash_erase /dev/mtd0 0 0
ubiformat /dev/mtd0 -s 2048 -O 2048
modprobe ubi
@jimparis
jimparis / punch.py
Created October 16, 2012 20:53 — forked from NicolasT/punch.py
Using FALLOC_FL_PUNCH_HOLE from Python to punch holes in files
#!/usr/bin/python
import ctypes
import ctypes.util
c_off_t = ctypes.c_int64
def make_fallocate():
libc_name = ctypes.util.find_library('c')
libc = ctypes.CDLL(libc_name)
@masak
masak / explanation.md
Last active April 11, 2024 02:50
How is git commit sha1 formed

Ok, I geeked out, and this is probably more information than you need. But it completely answers the question. Sorry. ☺

Locally, I'm at this commit:

$ git show
commit d6cd1e2bd19e03a81132a23b2025920577f84e37
Author: jnthn <jnthn@jnthn.net>
Date:   Sun Apr 15 16:35:03 2012 +0200

When I added FIRST/NEXT/LAST, it was idiomatic but not quite so fast. This makes it faster. Another little bit of masak++'s program.

@wolfiestyle
wolfiestyle / Makefile
Created March 28, 2012 00:15
basic makefile for D language
# basic makefile for D language - made by darkstalker
DCC = dmd
DFLAGS = -w
LIBS =
SRC = $(wildcard *.d)
OBJ = $(SRC:.d=.o)
OUT = $(shell basename `pwd`)
.PHONY: all debug release profile clean
@eyliu
eyliu / constitution.cls
Created August 11, 2009 20:05
LaTeX document class for typesetting a constitution
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesClass{constitution}[2009/05/15 v0.0.1 Document class for typesetting a constitution]
\LoadClass{report}
\RequirePackage[letterpaper,margin=1in]{geometry}
\RequirePackage[colorlinks,linkcolor=blue]{hyperref}
%\usepackage{hyperref}
\RequirePackage{titlesec}