Skip to content

Instantly share code, notes, and snippets.

Alexandre Richonnier heralight

Block or report user

Report or block heralight

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
heralight / Zip with
Last active Dec 26, 2017
Automator Zip Compress / Uncompress with pattern filename
View Zip with
tabargs=( "$@" )
directory=$(dirname "$1")
cd "$directory"
zipFileName=`basename "$firstFile"`
DATE=`date '+%Y%m%d_%H%M%S'`
echo $zipFileName
echo $directory
heralight / Remove all git tags
Last active Nov 11, 2017 — forked from okunishinishi/Remove all git tags
Delete all git remote tags
View Remove all git tags
# Delete local tags.
git tag -d $(git tag -l)
#Fetch remote tags.
git fetch
#Delete remote tags.
git push origin --delete $(git tag -l) # Pushing once should be faster than multiple times
#Delete local tags.
git tag -d $(git tag -l)
# for shell copy paste:
heralight /
Created Oct 27, 2017 — forked from keo/
Setup encrypted partition for Docker containers
# Setup encrypted disk image
# For Ubuntu 14.04 LTS
apt-get update
apt-get -y upgrade
apt-get -y install cryptsetup
heralight /
Created Nov 3, 2015
A script to generate dummy debian package with equivs to bypass crazy dependencies
function process
echo "######### key : $packageName"
v=$(eval "apt-cache policy $packageName | grep 'Candidate:' | cut -c 14-")
echo "######### version: $v"
heralight /
Last active Dec 10, 2016
Tips to Upgrade a liftweb application from 2.5 2.6 to version 3

Some tips to upgrade your lift 2.5 2.6 application to lift 3 (3.0-SNAPSHOT, 3.0-M2, ...etc)


replace ensureIndex( by createIndex( replace setIsUnset( by setIfUnset(

New Features

View Install Cloud9 on local or remote computer, server, or raspberry pi
Complete installation process:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -y python-software-properties python make build-essential g++ curl libssl-dev apache2-utils git libxml2-dev mercurial
sudo apt-get update
sudo apt-get upgrade
cd ~
mkdir git
cd ~/git
View JsCommands30.scala
package demo.js
import net.liftweb.http.js.JsCmd
object JsCommands30 {
* JsSchedule the execution of the JsCmd using setTimeout()
* @param what the code to execute
heralight / fix-firefox-fout-font-awesome.html
Last active May 2, 2017
Fix font-awesome firefox FOUT
View fix-firefox-fout-font-awesome.html
<script type="text/javascript">
WebFontConfig = {
custom: { families: [ 'FontAwesome' ],
urls: [ '//'] }
(function() {
var wf = document.createElement('script');
wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
wf.type = 'text/javascript';
heralight / gist:5196339
Created Mar 19, 2013
add permission on all files with lift like for an admin part
View gist:5196339
package code.lib
import net.liftweb.common._
import net.liftweb.http._
import S._
import net.liftweb.util._
import Helpers._
import code.model.User
heralight / upload-img.html
Created Jan 23, 2013
jquery.fileupload completed callback and add image as list with template.
View upload-img.html
$('#fileupload').fileupload('option', {
/* on upload complete event*/
completed:function(e, responseJSON){
var files = getFilesFromResponse(responseJSON);
var file = files[0] ||
{error: 'Empty file upload result'};
if (!file.error) {
var data = {};
You can’t perform that action at this time.