Skip to content

Instantly share code, notes, and snippets.

View apetresc's full-sized avatar

Adrian Petrescu apetresc

View GitHub Profile
@apetresc
apetresc / .vimrc
Created May 12, 2010 17:35
My personal vim settings and color themes.
" ======================== General Code-editing preferences =========
set number
syntax on
colorscheme zenburn
set background=dark
map <F4> :e %:p:s,.h$,.X123X,:s,.c$,.h,:s,.X123X$,.c,<CR>
map <F3> :TlistToggle<CR>
map <C-b> :make clean all<CR>
@apetresc
apetresc / AWS SDK for Java build.xml
Created May 21, 2010 20:04
A regular Ant build.xml file for the AWS SDK for Java, for those of us who prefer not to use Maven. Generates a JAR essentially identical to the one distributed by Amazon.
<project name="aws-java-sdk" default="build" basedir=".">
<property name="appname" value="aws-java-sdk" />
<property name="appversion" value="1.0.004" />
<property name="third-party.root" location="${basedir}/third-party" />
<property name="src.dir" location="${basedir}/src/main/java" />
<property name="resources.dir" location="${basedir}/src/main/resources" />
<property name="build.dir" location="${basedir}/build" />
@apetresc
apetresc / .gdbinit
Created June 13, 2010 16:52
.gdbinit file that pretty-prints STL functions.
#
# STL GDB evaluators/views/utilities - 1.03
#
# The new GDB commands:
# are entirely non instrumental
# do not depend on any "inline"(s) - e.g. size(), [], etc
# are extremely tolerant to debugger settings
#
# This file should be "included" in .gdbinit as following:
# source stl-views.gdb or just paste it into your .gdbinit file
@apetresc
apetresc / twig.sh
Created June 29, 2010 09:50
TWIG script to download all the SGFs from a specified page and organize them
#!/bin/bash
SGF_SRC_LIST=/home/adrian/usr/local/twig/urls.txt
SCRATCH_DIR=/home/adrian/usr/local/twig/cache
DESTINATION_DIR=/home/adrian/Go/Games/TWIG
mkdir $SCRATCH_DIR
cd $SCRATCH_DIR
wget -r -l inf -t1 -nd -N -np -A.sgf -erobots=off -i "$SGF_SRC_LIST"
#! /usr/bin/python
## arXiv script version 0.2
## Copyright 2008 Tom Brown
## This program is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 3 of the
## License, or (at your option) any later version.
#Sat Aug 08 13:45:06 EDT 2009
content_assist_proposals_foreground=0,0,0
java_doc_default=179,181,175
java_doc_link=168,147,204
content_assist_proposals_background=255,255,255
useQuickDiffPrefPage=true
java_single_line_comment=127,159,127
java_comment_task_tag=172,193,172
semanticHighlighting.localVariable.color=212,196,169
sourceHoverBackgroundColor.SystemDefault=false
@apetresc
apetresc / config
Created October 28, 2010 05:53
git-svn s3fs config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[svn-remote "svn"]
url = https://s3fs.googlecode.com/svn/trunk/s3fs
fetch = :refs/remotes/git-svn
[svn]
authorsfile = /home/apetresc/secure/gitstuff/authors
@apetresc
apetresc / AWSDemo.java
Created December 31, 2010 08:30
A modified version of the AWS SDK for Android sample code which fetches credentials from awskeyserver.
package com.amazon.aws.demo;
import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.io.Writer;
import java.net.URL;
import java.net.URLConnection;
@apetresc
apetresc / Fink crash log
Created February 23, 2011 03:36
When running fink update-all after the recent 2011-02-22 update
make: Entering directory `/sw/src/fink.build/xvidcore-1.2.2-2/xvidcore/build/generic'
D: =build
C: ./decoder.c
C: ./encoder.c
C: ./xvid.c
C: bitstream/bitstream.c
C: bitstream/cbp.c
C: bitstream/mbcoding.c
C: dct/fdct.c
C: dct/idct.c
@apetresc
apetresc / gist:1192353
Created September 4, 2011 06:02
brew install -v macvim
==> Downloading https://github.com/b4winckler/macvim/tarball/snapshot-61
File already downloaded in /Users/adrian/Library/Caches/Homebrew
/usr/bin/tar xf /Users/adrian/Library/Caches/Homebrew/macvim-7.3-61.tgz
==> ./configure --with-macsdk=10.6 --with-features=huge --with-tlib=ncurses --enable-multibyte --with-macarchs=i386 --enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-tclinterp
./configure --with-macsdk=10.6 --with-features=huge --with-tlib=ncurses --enable-multibyte --with-macarchs=i386 --enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-tclinterp
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no