Skip to content

Instantly share code, notes, and snippets.


David Herberth Dav1dde

View GitHub Profile
View gist:c509d472085f9374fc1d
from ijson import common
from ijson.backends import YAJLImportError
from cffi import FFI
ffi = FFI()
typedef void * (*yajl_malloc_func)(void *ctx, size_t sz);
typedef void (*yajl_free_func)(void *ctx, void * ptr);
typedef void * (*yajl_realloc_func)(void *ctx, void * ptr, size_t sz);
View gist:8736877
root@rescue /mnt # pacstrap /mnt base
==> Creating install root at /mnt
==> Installing packages to /mnt
pacman: error while loading shared libraries: cannot open shared object file: No such file or directory
==> ERROR: Failed to install packages to new root
root@rescue /mnt # apt-get install libgpgme
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libgpgme
View gist:8736197
root@rescue ~/pacman-4.1.2 # make CFLASG="-DPATH_MAX=256"
make --no-print-directory all-recursive
Making all in lib/libalpm
Making all in po
CC libalpm_la-add.lo
CC libalpm_la-alpm.lo
CC libalpm_la-alpm_list.lo
CC libalpm_la-backup.lo
CC libalpm_la-be_local.lo
CC libalpm_la-be_package.lo
View gist:5831219
upstream dtutorapp {
server {
listen 80 default_server;
server_name _;
root /home/dtutor/dtutor/app/static/;
keepalive_timeout 5;
View atlas.d
struct Node {
Rectangle area;
string name;
Image image;
Node* left;
Node* right;
Node* insert(Image image, string name) {
View x.d
auto newTypeArray = cast(ArrayType)newType;
auto oldTypeArray = cast(ArrayType)oldType;
if (result.isPointer && (newTypeArray !is null && oldTypeArray !is null)) {
auto llvmPrim = cast(PrimitiveType)newTypeArray.base;
if (llvmPrim !is null && llvmPrim.bits <= 8)
return handleCastArray(state, loc, newType, result);
View gist:5564367
echo "[Compile]"
OUT=$(dub build --rdmd 2>&1)
bin/rcd 1>/dev/null 2>&1 &
echo " [Ready]"
inotifywait -m ./rcd -r 2>/dev/null | while read -r dir event name; do
if [ "$event" == "MODIFY" -o "$event" == "MOVED_TO" ]; then
# -*- coding: utf-8 -*-
from string import ascii_lowercase
char_order_de = ['e', 'n', 'i', 'r', 's', 'a', 't', 'd', 'h', 'u', 'l', 'g',
'o', 'c', 'm', 'b', 'f', 'w', 'k', 'z', 'p', 'v', 'j', 'y', 'x', 'q']
char_order_en = ['e', 't', 'a', 'o', 'i', 'n', 's', 'r', 'h', 'l', 'd', 'c',
import java.util.Scanner;
public class AsciiShop01 {
public static void main(String[] args) {
Scanner scanner = new Scanner(;
int last_length = -1;
int overall = 0;
for(;scanner.hasNextLine();overall++) {
View config.h
/* See LICENSE file for copyright and license details. */
/* appearance */
static const char font[] = "fixed medium roman semicondensed normal normal 13px";
//static const char font[] = "Sans 8";
/*static const char selbordercolor[] = "#ffffff";
static const char selbgcolor[] = "#5c5c5c";
static const char selfgcolor[] = "#ffffff";
static const char normbordercolor[] = "#000000";
static const char normbgcolor[] = "#ffffff";