Skip to content

Instantly share code, notes, and snippets.

View niklasfi's full-sized avatar

Niklas Fischer niklasfi

View GitHub Profile
#!/usr/bin/python
# -*- coding: utf-8 -*-
from PyQt4 import QtGui as gui
from PyQt4 import QtCore as core
import sys
import os
import argparse
import subprocess
import select
all:
pdflatex minimal.tex
makeglossaries minimal
pdflatex minimal.tex
@niklasfi
niklasfi / linuxparty.sh
Created October 10, 2011 22:55
WS11/12 linux install party script
#!/bin/bash
set -e
# Root pruefen
if [ x$EUID != x0 ]
then
echo "Du bist nicht ROOT ... verwende \"sudo bash $0\" !"
exit 1
Waf: Entering directory `/home/niklas/develop/node/node/build'
DEST_OS: linux
DEST_CPU: x64
Parallel Jobs: 1
Product type: program
[ 1/35] copy: src/node_config.h.in -> build/default/src/node_config.h
[ 2/35] copy: tools/nodejs.pc.in -> build/default/tools/nodejs.pc
[ 3/35] cc: deps/http_parser/http_parser.c -> build/default/deps/http_parser/http_parser_3.o
/usr/bin/gcc -rdynamic -pthread -g -O3 -DHAVE_OPENSSL=1 -DHAVE_MONOTONIC_CLOCK=1 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_FDATASYNC=1 -DARCH="x64" -DPLATFORM="linux" -D__POSIX__=1 -Wno-unused-parameter -D_FORTIFY_SOURCE=2 -Idefault/deps/http_parser -I../deps/http_parser ../deps/http_parser/http_parser.c -c -o default/deps/http_parser/http_parser_3.o
[ 4/35] src/node_natives.h: src/node.js lib/dgram.js lib/console.js lib/buffer.js lib/net_legacy.js lib/querystring.js lib/punycode.js lib/http.js lib/freelist.js lib/events.js lib/util.js lib/assert.js lib/module.js lib/_debugger.js lib/tty_win32.js lib/fs.js lib/os.js lib/dns_legacy.js lib/vm.js lib/
mkdir include lib bin
make init
make[1]: Entering directory `/home/niklas/sri'
for subdir in misc dstruct lm flm lattice utils; do \
(cd $subdir/src; make SRILM=/home/niklas/sri MACHINE_TYPE=i686 OPTION= MAKE_PIC= init) || exit 1; \
done
make[2]: Entering directory `/home/niklas/sri/misc/src'
cd ..; /home/niklas/sri/sbin/make-standard-directories
make ../obj/i686/STAMP ../bin/i686/STAMP
make[3]: Entering directory `/home/niklas/sri/misc/src'
#include "container.h"
unsigned int container::room_remaining() const{
return (unsigned int)(size - room_used);
}
@niklasfi
niklasfi / gist:1023505
Created June 13, 2011 19:35
Memory Hogging MPD
port "9997"
music_directory "/media/grab/Audio/Music"
playlist_directory "~/.mpd/playlists"
db_file "~/.mpd/mpd.db"
log_file "~/.mpd/mpd.log"
state_file "~/.mpd/mpdstate"
user "niklas"
audio_output {
type "pulse"
g++ --std=c++0x -c ui2.cpp
g++ --std=c++0x test.cpp ui2.o
/tmp/cc4DASkN.o: In function `main':
test.cpp:(.text+0x20): undefined reference to `std::function<bool (int const&)> ui2::check_true<int>()'
collect2: ld gab 1 als Ende-Status zurüc
g++ -g -Wall -c ui.cpp
ui.cpp: In function ‘T ui::in(std::string)’:
ui.cpp:13: error: ‘numeric_limits’ is not a member of ‘std’
ui.cpp:13: error: expected primary-expression before ‘>’ token
ui.cpp:13: error: ‘::max’ has not been declared
make: *** [ui.o] Fehler 1
W: Possible missing firmware "cbfw_fc.bin" for kernel module "bfa.ko"
W: Possible missing firmware "ctfw_cna.bin" for kernel module "bfa.ko"
W: Possible missing firmware "ctfw_fc.bin" for kernel module "bfa.ko"
W: Possible missing firmware "aic94xx-seq.fw" for kernel module "aic94xx.ko"