Skip to content

Instantly share code, notes, and snippets.

View fallenhitokiri's full-sized avatar

Timo Zimmermann fallenhitokiri

View GitHub Profile
@fallenhitokiri
fallenhitokiri / .gvimrc
Created January 19, 2012 10:00
test gist from gistvim - gvimrc
set nocompatible
behave mswin
" allow backspacing over everything in insert mode
set backspace=indent,eol,start
set nobackup
set nowritebackup
set noswapfile
class lesson1 {
/* Main Klasse */
public static void main(String args[]) {
System.out.println("Ausgabe in der Konsole"); //muss ja auch mal
}
}
class IchObjekt{
int zahl = 3;
String zeichen = null;
public IchObjekt(int argument1) {
zahl = argument1;
}
public void ausgabe() {
System.out.println("Zahl: " + zahl + " String: " + zeichen);
@fallenhitokiri
fallenhitokiri / gist:2070427
Created March 18, 2012 10:29
ruby 1.9.3-p125 error using JewelryBox 1.2.1 on OSX 10.6
[2012-03-18 09:31:30] make -j2
CC = /usr/bin/gcc-4.2
LD = ld
LDSHARED = /usr/bin/gcc-4.2 -dynamiclib
CFLAGS = -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=shorten-64-to-32 -Werror=implicit-function-declaration -fno-common -pipe -arch i386 -arch x86_64
XCFLAGS = -include ruby/config.h -include ruby/missing.h -fvisibility=hidden -DRUBY_EXPORT
CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I. -I.ext/include/universal-darwin10.8.0 -I./include -I.
DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace -install_name /Users/tizi/.rvm/rubies/ruby-1.9.3-p125/lib/libruby.1.9.1.dylib -current_version 1.9.1 -compatibility_version 1.9.1 -Wl,-unexported_symbol,_Init_* -Wl,-unexported_symbol,*_threadptr_* -Wl,-u,_objc_msgSend -arch i386 -arch x86_64
SOLIBS =
compiling main.c
@fallenhitokiri
fallenhitokiri / hack.sh
Created March 31, 2012 10:20 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@fallenhitokiri
fallenhitokiri / models.py
Created June 8, 2012 11:23
blog-tumblelog-1
from django.db import models
class Post(models.Model):
title = models.CharField(max_length=1000)
pub_date = models.DateTimeField(auto_now_add=True)
content = models.TextField()
class Url(models.Model):
title = models.CharField(max_length=1000)
pub_date = models.DateTimeField(auto_now_add=True)
if [ $UID -eq 0 ]; then LOGINCOLOR="red"; else LOGINCOLOR="blue"; fi
function virtualenv_info {
[ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') '
}
PROMPT='%{${fg[blue]}%}[%{$reset_color%}%m%{${fg[blue]}%}]%{$reset_color%} %{${fg[magenta]}%}%B%3~%b %{$reset_color%}%{${fg[$LOGINCOLOR]}%}»%{$reset_color%} '
RPROMPT='$(git_prompt_info)'
@fallenhitokiri
fallenhitokiri / vimrc
Last active December 20, 2015 04:49
emergency vimrc
set nocompatible
set nobackup
set nowritebackup
set noswapfile
set history=100
set incsearch
set tabstop=4
set shiftwidth=4
set expandtab
set number
@fallenhitokiri
fallenhitokiri / .zshrc
Last active December 20, 2015 11:39
quick zsh configuration
autoload -U colors && colors
autoload -U compinit && compinit
# completion
zstyle ':completion:*' menu select
setopt completealiases
# history
HISTFILE=$HOME/.zsh_history
HISTSIZE=1000
func filterEntities(s []*Entity, key string, val string) (res []*Entity) {
val = strings.ToLower(val)
for _, e := range s {
switch reflect.ValueOf(e).Elem().FieldByName(key).Kind() {
case reflect.Slice:
imm := reflect.ValueOf(e).Elem().FieldByName(key)
for i := 0; i < imm.Len(); i++ {
v := imm.Index(i).String()