Skip to content

Instantly share code, notes, and snippets.

View jcarsique's full-sized avatar

Julien Carsique jcarsique

View GitHub Profile
@jcarsique
jcarsique / ndrive.desktop
Last active December 16, 2015 10:39
Nuxeo Drive Linux desktop entry
[Desktop Entry]
Type=Application
Exec=ndrive
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name[fr_FR]=Nuxeo Drive
Name=Nuxeo Drive
Comment[fr_FR]=
Comment=
@jcarsique
jcarsique / wtf-did-i-do
Last active February 24, 2022 16:05
"WTF did I do?!" from https://coderwall.com/p/saylrw
#!/bin/bash
function usage() {
echo 'Usage: wtf-did-i-do {options}'
echo
echo 'OPTIONS:'
echo " -a author/committer; '' is allowed (defaults to $USER)"
echo ' -s since such date (defaults to 7.days.ago)'
echo ' -u until such date (defaults to today)'
echo ' -m directories max depth recurse (defaults to 1)'
@jcarsique
jcarsique / pre-commit
Created November 25, 2013 15:30
Git pre-commit hook
#!/bin/sh
#
# A git hook script to find and fix trailing whitespace
# in your commits. Bypass it with the --no-verify option
# to git-commit
#
if git-rev-parse --verify HEAD >/dev/null 2>&1 ; then
against=HEAD
[DEFAULT]
other_versions = 5.9.1-SNAPSHOT/5.9.1/5.9.2-SNAPSHOT
branch = master
tag = auto
next_snapshot = auto
maintenance_version = auto
mp_to_upload = marketplace/target/marketplace*.zip
[marketplace-agenda]
@jcarsique
jcarsique / .bash_aliases
Last active January 12, 2024 11:33
Bash config
alias cd..="cd .."
alias md="mkdir"
alias rd="rmdir"
alias mvni="mvn install -DskipTests=true"
alias mvnci="mvn clean install -DskipTests=true"
alias mvnecl='mvn eclipse:clean eclipse:eclipse -Declipse.useProjectReferences=true -fae -nsu ; ~/workspace/nuxeo/fixeclipse'
alias mvn2ecl="mvn eclipse:clean eclipse:m2eclipse -Declipse.useProjectReferences=true && ~/workspace/nuxeo/fixeclipse"
alias mvneclj="mvn eclipse:clean eclipse:eclipse -DdownloadJavadocs=true -Declipse.useProjectReferences=true && ~/workspace/nuxeo/fixeclipse"
alias mvnecls="mvn eclipse:clean eclipse:eclipse -DdownloadSources=true -Declipse.useProjectReferences=true && ~/workspace/nuxeo/fixeclipse"
alias hgl='hg glog|less'
<?xml version="1.0" encoding="UTF-8"?>
<bookmarks>
<site url="http://andrei.gmxhome.de/eclipse/" selected="true" name="andrei plugins"/>
<site url="http://archive.eclipse.org/mylyn/drops/3.11.0/v20140314-2044" selected="true" name="Mylyn for Eclipse 3.7, 3.8 and 4.2"/>
<site url="http://archive.eclipse.org/mylyn/drops/3.8.0/v20120612-0600" selected="true" name="Mylyn for Eclipse 3.6, 3.7 and 3.8"/>
<site url="http://community.nuxeo.com/static/nuxeo-ide/dev/site/site.xml" selected="true" name="Nuxeo IDE DEV update site"/>
<site url="http://community.nuxeo.com/static/nuxeo-ide/stable/site/" selected="true" name="Nuxeo IDE Update Site"/>
<site url="http://dadacoalition.org/yedit" selected="true" name="Update Site"/>
<site url="http://dev-utils-plugin.googlecode.com/svn/trunk/update" selected="true" name="Update Site"/>
<site url="http://dev.eclipse.org/svnroot/dsdp/org.eclipse.tm.tcf/releases/0.4.1" selected="false" name=""/>
@jcarsique
jcarsique / .gitaliases
Last active February 24, 2022 15:55
.gitconfig .gitaliases
# Standalone aliases install:
# wget https://gist.githubusercontent.com/jcarsique/24f8dd46d176bb67253e/raw/.gitaliases -O ~/.gitaliases
# git config --global include.path ~/.gitaliases
[alias]
ls = "ls-tree --name-only"
ll = "ls-tree -l"
st = status -sb
ci = commit
co = checkout

Execute prepare_repo.sh on the repository(ies) to merge.

Clone https://github.com/robinst/git-merge-repos

Run ./run.sh /path/to/repo1:. /path/to/repo2:.

Merged repository is in merged-repo

Update .gitignore and remove those in sub-directories

@jcarsique
jcarsique / notify.sh
Last active November 18, 2015 11:07
Nuxeo Platform releases notification
#!/bin/bash
VERSION="7.10"
HASHTAG="#Nx710"
TWITTER="New Set of Addons released on http://marketplace.nuxeo.com/ for Nuxeo Platform $VERSION:\nG+_POST_URL\n$HASHTAG"
GOOGLE="\n\nNew Set of Addons released on http://marketplace.nuxeo.com/ for the Nuxeo Platform $VERSION:\n"
while IFS=' ' read url name; do
version=${url#*=}
[ -z "$url" ] && continue
GOOGLE="$GOOGLE\n¤ *$name* $version\n$url\n"
done <<< "
"use docx2txt.pl to allow VIm to view the text content of a .docx file directly.
autocmd BufReadPre *.docx set ro
autocmd BufReadPost *.docx %!docx2txt.pl
set number
" size of a hard tabstop
set tabstop=4
" size of an "indent"
set shiftwidth=4
" a combination of spaces and tabs are used to simulate tab stops at a width other than the (hard)tabstop
set softtabstop=4