Skip to content

Instantly share code, notes, and snippets.

View fxthomas's full-sized avatar

François-Xavier Thomas fxthomas

  • DxOMark Image Labs
  • Paris
View GitHub Profile
@fxthomas
fxthomas / obj2json.py
Created May 15, 2011 16:39
OBJ to JSON conversion
#!/usr/bin/python
# coding=utf-8
# Base Python File (obj2py.py)
# Created: Sun 15 May 2011 05:21:50 PM CEST
# Version: 1.0
#
# This Python script was developped by François-Xavier Thomas.
# You are free to copy, adapt or modify it.
# If you do so, however, leave my name somewhere in the credits, I'd appreciate it ;)
@fxthomas
fxthomas / dokucode.part.py
Created May 16, 2011 22:23
Dokucode (Part)
# Search text for blocks and replace with format placeholders
def _prep_blocks (text, autoescape=None):
known_upper_tags = [CodeTag, VimeoTag, URLTag, GalleryTag, ImageTag, FileTag, NewzTag]
blocks = []
count = 0
for t in known_upper_tags:
for r in t.Code:
while True:
m = r.search (text)
@fxthomas
fxthomas / .bashrc
Created June 16, 2011 23:09
BashRC
# This .bashrc script was developped by François-Xavier Thomas.
# You are free to copy, adapt or modify it.
# If you do so, however, leave my name somewhere in the credits, I'd appreciate it ;)
#
# Although some parts were ripped off various sources over the internet, I gathered them and made my own there.
# I try to keep up with these sources as I add them, but if you're the author and don't like it, just message me on twitter @fxvisual
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
@fxthomas
fxthomas / .screenrc
Created June 16, 2011 23:48
ScreenRC
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= #
### Created by Brad Sims <tanfj@yahoo.com> 25/06/2004
### I got tired of .screenrc's on the internet being so
### poorly commented... So being a good GNUbie I took matters
### into my own hands; and wrote this dotfile.
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= #
@fxthomas
fxthomas / .vimrc
Created June 16, 2011 23:48
VimRC
" Basic Settings
set nocompatible
syntax on
set ofu=syntaxcomplete#Complete
set autoread " If an open file is changed outside of VIM, it is automatically reloaded
filetype on
filetype plugin on
filetype plugin indent on
set number
@fxthomas
fxthomas / .bash_aliases
Created June 16, 2011 23:50
Bash Aliases
# This bash aliases were added by François-Xavier Thomas.
# You are free to copy, adapt or modify it.
# If you do so, however, leave my name somewhere in the credits, I'd appreciate it ;)
# Some more ls aliases
alias ll='ls -lth'
alias la='ls -ltha'
alias l='ls -CF'
## Personnal aliases
@fxthomas
fxthomas / .conkyrc
Created June 16, 2011 23:50
ConkyRC
# Conky, a system monitor, based on torsmo
#
# Any original torsmo code is licensed under the BSD license
#
# All code written since the fork of torsmo is licensed under the GPL
#
# Please see COPYING for details
#
# Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
# Copyright (c) 2005-2010 Brenden Matthews, Philip Kovacs, et. al. (see AUTHORS)
@fxthomas
fxthomas / lftp.conf
Created June 16, 2011 23:51
Lftp Configuration
## some useful aliases
alias ls "ls -h"
alias dir ls
alias less more
alias zless zmore
alias bzless bzmore
alias mirror "mirror -v"
alias sync "mirror -R -v -n"
alias reconnect "close; cache flush; cd ."
alias edit "eval -f \"get $0 -o ~/.lftp/edit.tmp.$$ && shell \\\"cp -p ~/.lftp/edit.tmp.$$ ~/.lftp/edit.tmp.$$.orig && $EDITOR ~/.lftp/edit.tmp.$$ && test ~/.lftp/edit.tmp.$$ -nt ~/.lftp/edit.tmp.$$.orig\\\" && put ~/.lftp/edit.tmp.$$ -o $0; shell rm -f ~/.lftp/edit.tmp.$$*\""
@fxthomas
fxthomas / normal.html
Created June 17, 2011 13:17
Vertex & Fragment Shaders for Normal recomputation
<!-- Depth Vertex Shader -->
<script id="depth-vs" type="x-shader/x-vertex">
attribute vec3 vertexPosition;
uniform mat4 modelViewMatrix;
uniform mat4 perspectiveMatrix;
varying float depth;
void main (void) {
// Compute position un screen
@fxthomas
fxthomas / .htoprc
Created July 23, 2011 01:05
HTop Configuration
# Beware! This file is rewritten every time htop exits.
# The parser is also very primitive, and not human-friendly.
# (I know, it's in the todo list).
fields=0 48 17 18 38 39 40 2 46 47 49 1
sort_key=46
sort_direction=1
hide_threads=0
hide_kernel_threads=0
hide_userland_threads=0
shadow_other_users=0