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 / gprs
Created August 2, 2011 21:37
GPRS PPP Scripts for Sony Ericsson W850i
# $Id: gprs,v 1.4 2004/04/28 08:40:32 mcfrisk Exp $
#
# File:
# gprs
#
# Description:
# Serial cable, IrDA, Bluetooth and USB pppd options for GPRS phones.
# See 'man pppd' for detailed option descriptions.
# Most GPRS phones don't reply to LCP echo's
@fxthomas
fxthomas / gist:1134874
Created August 9, 2011 18:52
Download Shaping Scripts
We couldn’t find that file to show.
@fxthomas
fxthomas / jsonv
Created January 18, 2012 21:47
JSON Validation Script for VIM with built-in Python module
#!/bin/bash
# Base Script File (jsonv.sh)
# Created: Fri Jan 13 15:26:18 2012
# Version: 1.0
# Author: François-Xavier Thomas <[email protected]>
#
# This Bash 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 / patch.diff
Created February 11, 2012 01:32
Patch for Kite 1.0.4 (with BDW-GC 7.2alpha6)
--- a/backend/common/kite_vm.c 2010-08-21 01:20:25.000000000 +0200
+++ b/backend/common/kite_vm.c 2012-02-11 02:29:37.000000000 +0100
@@ -152,7 +152,12 @@
#endif
#ifdef HAVE_GC_H
+#if GC_VERSION_MAJOR >= 7 && GC_VERSION_MINOR >= 2
+ ret->old_proc = GC_get_warn_proc();
+ GC_set_warn_proc ((GC_warn_proc)kite_ignore_gc_warnings);
+#else
@fxthomas
fxthomas / setup.py
Created February 11, 2012 18:01
Distutils setup file for LibSVM 3.11
#!/usr/bin/python
# coding=utf-8
from setuptools import setup, find_packages
setup(
name = "LibSVM",
version = "3.11",
packages = find_packages(),
)
@fxthomas
fxthomas / test.lua
Created February 20, 2012 17:50
Lua Test
-- Test LUA lesson
function main ()
image_params = {
id = "equerre",
type = "image",
params = {
filename = "Bubble.png",
movable = false
}
@fxthomas
fxthomas / ilocalize.py
Created May 7, 2012 10:32
iLocalize -- Xcode project localizer
#!/usr/bin/python
# coding=utf-8
# Base Python File (ilocalize.py)
# Created: Sun May 6 11:18:15 2012
# 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 / test.py
Created May 22, 2012 23:05
Quick NumPy usage example
#!/usr/bin/python
# coding=utf-8
# Import everything you need for image processing
from pylab import *
# This is an addon that's needed to be able to save the image
from scipy.misc import imsave
# Read image called "input.jpg" (rename that to whatever you want)
@fxthomas
fxthomas / osx-tunnel.sh
Created November 26, 2012 20:17
Automatic tunnel for Mac OSX
#!/bin/bash
function enable_proxy {
echo "Enabling SOCKS proxy to localhost:8080"
networksetup -setsocksfirewallproxy wi-fi localhost 9999
}
function disable_proxy {
echo "Disabling SOCKS proxy"
networksetup -setsocksfirewallproxystate wi-fi off
@fxthomas
fxthomas / Advanced-settings.md
Last active August 3, 2016 09:17
SBTEclipse wiki entry about changing project description files

Changing project files

Eclipse .project and .classpath files are XML files, and you can hook into sbteclipse's generation process by using the classpathTransformerFactories and projectTransformerFactories setting keys.

(The following Scala samples should be inside your project's Build.scala file, or a plugin)

Let's say we want to add the com.example.nature nature to our project. The