Skip to content

Instantly share code, notes, and snippets.

Avatar

Arnold Daniels jasny

View GitHub Profile
@MightyPork
MightyPork / utf8_encode.c
Last active Oct 8, 2021
C function to encode a Unicode code point as UTF-8 byte array
View utf8_encode.c
#include <stdint.h>
/**
* Encode a code point using UTF-8
*
* @author Ondřej Hruška <ondra@ondrovo.com>
* @license MIT
*
* @param out - output buffer (min 5 characters), will be 0-terminated
* @param utf - code point 0-0x10FFFF
@lyrixx
lyrixx / post-checkout
Created Jun 26, 2013
Git post checkout
View post-checkout
#!/bin/bash
# Put this file at: .git/hooks/post-checkout
# and make it executable
# You can install it system wide too, see http://stackoverflow.com/a/2293578/685587
PREV_COMMIT=$1
POST_COMMIT=$2
NOCOLOR='\e[0m'
@jasny
jasny / Autoloader.php
Created Oct 19, 2012
Autoloader for PHP
View Autoloader.php
<?php
/**
* A very simple autoloader
*/
class Autoloader
{
/**
* Only use this class statically.
* @ignore
@jasny
jasny / tinytextindex.md
Last active Jul 6, 2021
TinyTextIndex
View tinytextindex.md

Tiny Text Index

Lightweight text indexer for PHP

Uses the dba extension (with db4)


Storing

Hello my name is Arnold and I'm not crazy. Arnold's kids are crazy though.