Skip to content

Instantly share code, notes, and snippets.

View Dav1dde's full-sized avatar

David Herberth Dav1dde

View GitHub Profile
from ijson import common
from ijson.backends import YAJLImportError
from cffi import FFI
ffi = FFI()
ffi.cdef("""
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);
root@rescue /mnt # pacstrap /mnt base
==> Creating install root at /mnt
==> Installing packages to /mnt
pacman: error while loading shared libraries: libgpgme.so.11: 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
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
@Dav1dde
Dav1dde / gist:5831219
Last active December 18, 2015 19:09 — forked from anonymous/gist:5831109
upstream dtutorapp {
server 127.0.0.0:9001;
}
server {
listen 80 default_server;
server_name _;
root /home/dtutor/dtutor/app/static/;
keepalive_timeout 5;
struct Node {
Rectangle area;
string name;
Image image;
Node* left;
Node* right;
Node* insert(Image image, string name) {
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);
}
#!/bin/sh
echo "[Compile]"
OUT=$(dub build --rdmd 2>&1)
bin/rcd 1>/dev/null 2>&1 &
PID=$!
echo " [Ready]"
inotifywait -m ./rcd -r 2>/dev/null | while read -r dir event name; do
if [ "$event" == "MODIFY" -o "$event" == "MOVED_TO" ]; then
#!/usr/bin/python
# -*- 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(System.in);
int last_length = -1;
int overall = 0;
for(;scanner.hasNextLine();overall++) {
@Dav1dde
Dav1dde / config.h
Created April 20, 2013 18:48
My dwm setup
/* 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";