Skip to content

Instantly share code, notes, and snippets.

View elieux's full-sized avatar

David Macek elieux

View GitHub Profile
@elieux
elieux / Makefile
Last active April 2, 2017 14:56
DLL troubles
all: main.exe
foo.o: foo.c
gcc -c foo.c -o foo.o
libfoo.a: foo.o
ar sr libfoo.a foo.o
bar.o: bar.c
gcc -c bar.c -o bar.o
libbar.dll: bar.o libfoo.a
@elieux
elieux / testcase.c
Last active August 29, 2015 14:11
cygwin+subst issue
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <stdio.h>
int main() {
const char const* fn = "foo";
int handle1, handle2, res;
handle1 = open(fn, O_RDONLY | O_CREAT);
@elieux
elieux / 10morespace
Last active April 2, 2017 14:56
morespace.sh
#!/system/bin/sh
#
# MORESPACE - init script to use an ext4-formatted sdcard for both app installations and user data
# Revision: 3
# Author: github.com/elieux
# Device: Huawei Ascend G300 [U8815] with CM11
#
# Warning: The script does not reformat your sdcard. That needs to be done manually before installing the script.
# Warning: The script is not designed for multiple-partition sdcards (sd-ext).
#
@elieux
elieux / pacman.conf
Created November 16, 2014 14:21
pacman config
#
# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives
#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
@elieux
elieux / pacrepo-util
Last active August 29, 2015 14:09
pacrepo-util
#!/usr/bin/env python3
import configparser
import argparse
import shutil
class PacConfParser(configparser.ConfigParser):
def optionxform(self, option):
return option
@elieux
elieux / gdb.log
Last active August 29, 2015 14:09
Pacman crash
Program received signal SIGSEGV, Segmentation fault.
0x0000000100424bf8 in alpm_db_update (force=force@entry=0, db=db@entry=0x600052e90) at be_sync.c:246
246 len = strlen(final_db_url) + 5;
(gdb) bt
#0 0x0000000100424bf8 in alpm_db_update (force=force@entry=0, db=db@entry=0x600052e90) at be_sync.c:246
#1 0x0000000100409f02 in sync_synctree (level=1, syncs=syncs@entry=0x600052f30) at sync.c:330
#2 0x000000010040b0ee in pacman_sync (targets=0x0) at sync.c:941
#3 0x0000000100408168 in main (argc=2, argv=0x23aac0) at pacman.c:1231
(gdb) bt full
#0 0x0000000100424bf8 in alpm_db_update (force=force@entry=0, db=db@entry=0x600052e90) at be_sync.c:246
@elieux
elieux / build.log
Created October 21, 2014 16:56
DOMjudge build without jsoncpp
root@srva10gk:~/domjudge# cd submit
root@srva10gk:~/domjudge/submit# make build
g++ -g -O2 -Wall -fstack-protector -fPIE -D_FORTIFY_SOURCE=2 -DREVISION="\"g301eb9d\"" -I../lib -I../etc -c -o submit.o submit.cc
submit.cc:15:2: error: #error "libcURL or libJSONcpp not available."
submit.cc:30:31: fatal error: jsoncpp/json/json.h: No such file or directory
compilation terminated.
make: *** [submit.o] Error 1
@elieux
elieux / pacman.log
Created October 18, 2014 23:38
QtBinPatcher
QtBinPatcher v2.1.0. Tool for patching paths in Qt binaries.
Yuri V. Krugloff, 2013-2014. http://www.tver-soft.org
This is free software released into the public domain.
Parsed command line options:
nobackup
verbose
Working directory: "D:/applications/msys2.x64/mingw64/bin".
Creating libraries/array/ghc.mk
Creating libraries/array/GNUmakefile
Creating libraries/base/ghc.mk
Creating libraries/base/GNUmakefile
Creating libraries/bin-package-db/ghc.mk
Creating libraries/bin-package-db/GNUmakefile
Creating libraries/binary/ghc.mk
Creating libraries/binary/GNUmakefile
Creating libraries/bytestring/ghc.mk
Creating libraries/bytestring/GNUmakefile
@elieux
elieux / build.log
Created October 15, 2014 21:10
mono build error
*** Warning: Trying to link with static lib archive /mingw32/lib/libiconv.dll.a.
*** I have the capability to make that library automatically link in when
*** you link to this library. But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because the file extensions .a of this argument makes me believe
*** that it is just a static archive that I should not use here.