Skip to content

Instantly share code, notes, and snippets.

View xgouchet's full-sized avatar
📖
Writing some sci-fi novel…

Xavier F. Gouchet xgouchet

📖
Writing some sci-fi novel…
View GitHub Profile
@xgouchet
xgouchet / menurc
Created February 16, 2015 16:19
A Gimp shortcup preference file to mimic Photoshop shortcuts
; This file installs keyboard shortcuts from Photoshop 6 in GIMP 2.8.
;
; Rename it to 'menurc' and place it into your personal GIMP directory:
; ~/.gimp-2.8 folder (Linux)
;
;
(gtk_accel_path "<Actions>/view/view-shrink-wrap" "")
(gtk_accel_path "<Actions>/plug-in/plug_in_iwarp" "<Primary><Shift>x")
(gtk_accel_path "<Actions>/layers/layers-duplicate" "<Primary>j")
(gtk_accel_path "<Actions>/plug-in/plug_in_c_astretch" "<Primary><Shift><Alt>l")
@xgouchet
xgouchet / 51-android.rules
Created January 7, 2015 15:40
Android Debug Bridge (adb) udev definition file
################################################################################
# Android Debug Bridge (adb) udev definition file
#
# This rules file will add a /dev/android_adb symlink when an Android phone with
# an identified idVendor:idProduct appears on the USB port. Then it will run the
# Android adb program (located in specified RUN+ statement below).
#
# Copy this file to /etc/udev/rules.d/51-android.rules then run the following lines
# sudo chmod a+r /etc/udev/rules.d/51-android.rules
# sudo /etc/init.d/udev restart
@xgouchet
xgouchet / git_bash_prompt
Created January 7, 2015 08:17
A bash git prompt based on twolfson's "sexy bash prompt"
#!/usr/bin/env bash
# git bash prompt
# Based on twolfson's sexy bash prompt (https://github.com/twolfson/sexy-bash-prompt)
# If we are on a colored terminal
if tput setaf 1 &> /dev/null; then
# Reset the shell from our `if` check
tput sgr0 &> /dev/null
# If you would like to customize your colors, use
@xgouchet
xgouchet / adb-debug-over-wifi
Created December 15, 2014 13:13
A script to debug an Android device over wifi
#!/bin/sh
#
# usage :
# adb-debug-over-wifi [SERIAL OF THE DEVICE]
device_serial=$1
devices_attached=`adb devices -l | grep -c "device:"`
# check the device
if [ -z "$device_serial" ]; then
@xgouchet
xgouchet / folder_diff
Last active February 16, 2024 12:32
A shell script to perform a recursive diff between two folders
#!/bin/bash
## get the folders
folder1=$1
folder2=$2
empty="..."
# check we have two folders
if [ -z "$folder2" ]; then
echo " Missing folders to diff "
@xgouchet
xgouchet / LogUtils.java
Last active December 26, 2015 10:49
Just setup
package fr.xgouchet.androidlib.common;
import android.util.Log;
/**
* A utility class to insert logs in Android Log Cat, with link to the line calling it (much like in an exception stack trace).
*
*/
public final class LogUtils {