Skip to content

Instantly share code, notes, and snippets.

View ebouchut's full-sized avatar

Eric Bouchut ebouchut

View GitHub Profile
@ebouchut
ebouchut / PrintStackTraceInAString
Created November 14, 2011 13:54
Print a StackTrace in a String
StringWriter writer = new StringWriter();
e.printStackTrace(
new PrintStream(
new WriterOutputStream(
new PrintWriter(writer)
)
)
);
@ebouchut
ebouchut / WhereDoesMavenDependencyComesFrom
Last active November 25, 2020 10:09
How to check where a maven dependency comes from #maven #find #dependency
#
# To check from where a maven dependency comes from
#
mvn dependency:tree -Dincludes=groupId:artifactId
@ebouchut
ebouchut / gist:1510447
Created December 22, 2011 14:18
(Sass/maven) Unable to launch rake using jruby-rake-plugin
java -jar ~/.m2/repository/org/jruby/jruby-complete/1.6.5/jruby-complete-1.6.5.jar -S gem env
@ebouchut
ebouchut / gist:1815764
Created February 13, 2012 10:13
Select a tags without a title attribute using CSS
a:not([title])
@ebouchut
ebouchut / LighttpdReverseProxyURLRewriting
Last active January 27, 2021 20:35
Lighttpd reverse-proxy to that matches an URL _and_ does URL rewriting #web #server #lighttpd
#server.modules += ( "mod_rewrite")
# Workaround to have a working reverse-proxy that matches an URL does URL rewriting in Ligghtpd.
#
# Ligtthpd 1.4.28 cannot perform both matching and URL rewriting at the same time.
# Therefore we need to define 2 proxies, one does the matching and bounce the request
# to the other one, in charge of rewriting the URL before proxying the request to the target server.
#
# More about this here:
# http://redmine.lighttpd.net/issues/164#note-9
@ebouchut
ebouchut / gist:2005690
Created March 9, 2012 08:45
Print the fingerprint of a public key
ssh-keygen -lf ~/.ssh/id_rsa.pub
1024 43:28:56:7f:21:93:02:04:56:af:5f:cb:55:45:e1:67 /users/username/.ssh/id_rsa.pub (DSA)
@ebouchut
ebouchut / gist:3162811
Created July 23, 2012 09:32
Make Iceweasel the default browser (of Kopete and other programs like hotot)
System
Preferences
System Configuration
File Associations
text /html
Move "Iceweasel" to the top of the list
Personal
Default Applications
Web Browser
Tick "In an application based on the content of the URL"
@ebouchut
ebouchut / multi_cherry_pick
Created August 16, 2012 12:21
Cherry pick multiple commits
Cherry pick the commits from a through z (assuming SHA1 a is older than z)
git rev-list --reverse --topo-order a^..z | xargs -n 1 git cherry-pick
The below code does not work as it will squash all the commits (a..z) in a single one.
git cherry-pick a..z
@ebouchut
ebouchut / GwtChosen-ChromeWidthIssue.png
Created November 15, 2012 16:28
gwt-chosen issue26: ChosenListBox is too narrow on Chrome (optgroups wrap right)
GwtChosen-ChromeWidthIssue.png
@ebouchut
ebouchut / 0main.md
Created November 21, 2012 12:33 — forked from canton7/0main.md
Local versions of tracked config files

How to have local versions of tracked config files in git

This is a fairly common question, and there isn't a One True Answer.

These are the most common techniques:

If you can modify your application