Skip to content

Instantly share code, notes, and snippets.

@regis-leray
regis-leray / gist:755127
Created December 26, 2010 00:40
jquery-ujs + add back :submit, :with features
/*
* jquery-ujs
*
* add back the features ":submit",":with" features (link_to_remote) in the UJS
* manage this features by adding this with the HTML 5 attributes
* :with => data-with
* :submit => data-submit
*
* follow same behaviour http://apidock.com/rails/ActionView/Helpers/PrototypeHelper/link_to_remote
*
@regis-leray
regis-leray / release-git-script
Last active March 25, 2023 20:50
Release script using git and maven release plugin. Based on the "successful git branch model" and https://gist.github.com/searls/1043970 Its also managed the hotfix feature
#!/bin/bash
# How to perform a release with git & maven following the git flow conventions
# ----------------------------------------------------------------------------
# Finding the next version: you can see the next version by looking at the
# version element in "pom.xml" and lopping off "-SNAPSHOT". To illustrate,
# if the pom's version read "0.0.2-SNAPSHOT", the following instructions would
# perform the release for version "0.0.2" and increment the development version
# of each project to "0.0.3-SNAPSHOT".
#
@regis-leray
regis-leray / gist:6028773
Last active December 19, 2015 22:39
Css links
CSS/VERTICAL ALIGN
http://forum.alsacreations.com/topic.php?fid=4&tid=664&p=1
http://www.loriswebs.com/html-tips/verticallyalignimages.html
http://forum.alsacreations.com/topic.php?fid=4&tid=35#copy
http://openweb.eu.org/articles/initiation_flux/
CSS/FLOAT
@regis-leray
regis-leray / maven3-links
Last active December 19, 2015 22:39
Maven 3
@regis-leray
regis-leray / jquery-links
Created July 18, 2013 12:12
Jquery links
@regis-leray
regis-leray / import git repo into antoher with history
Last active August 29, 2015 13:56
Import git repository with history
git clone git@github.com:flyway/flyway.git
cd flyway
# move into another folder with rewriting the history
git filter-branch -f --prune-empty --tree-filter 'mkdir -p .root;mv * .root;mv .root root' -- --all
git clone git@github.com:regis-leray/flyway.git regis-flyway
cd regis-flyway/
git remote add origin-flyway ../flyway
git fetch origin-flyway
@regis-leray
regis-leray / Release on steroid
Last active August 29, 2015 13:56
Release on steroid
### Pre step / Execute Shell
# Remove the snapshot from the project version
project_version=`xpath -q -e "/project/version/text()" pom.xml`
mvn versions:set -DnewVersion=${project_version%-SNAPSHOT}-build.${BUILD_NUMBER}
### Build
clean deploy -Pintegration,release -Denvironment=int -Dpackage-deb=true -Dinstall-deb=true
@regis-leray
regis-leray / Run maven surefire debug mode
Created February 10, 2014 01:40
Run maven surefire debug mode
mvn clean test -Dmaven.surefire.debug="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -Xnoagent -Djava.compiler=NONE"
@regis-leray
regis-leray / Exclude maven profile
Created February 10, 2014 01:42
Exclude maven profile
mvn clean install '-P!CommercialDBJars,!MediumTests'
@regis-leray
regis-leray / debian repository
Last active August 29, 2015 14:00
cron + create deb repository
crontab -l
@reboot inoticoming --logfile /var/www/depot/logs/inoticoming-snapshot.log /var/www/depot/snapshot/binary --stderr-to-log --stdout-to-log --suffix '.changes' /usr/local/bin/update-apt-upload.sh /var/www/depot/snapshot \;
@reboot inoticoming --logfile /var/www/depot/logs/inoticoming-release.log /var/www/depot/release/binary --stderr-to-log --stdout-to-log --suffix '.changes' /usr/local/bin/update-apt-upload.sh /var/www/depot/release \;
cat /usr/local/bin/update-apt-upload.sh
#!/bin/sh
REPO_DIR=$1