This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream dtutorapp { | |
server 127.0.0.0:9001; | |
} | |
server { | |
listen 80 default_server; | |
server_name _; | |
root /home/dtutor/dtutor/app/static/; | |
keepalive_timeout 5; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Node { | |
Rectangle area; | |
string name; | |
Image image; | |
Node* left; | |
Node* right; | |
Node* insert(Image image, string name) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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"; |
NewerOlder