Skip to content

Instantly share code, notes, and snippets.

View rbecheras's full-sized avatar
👋

Rémi Becheras rbecheras

👋
View GitHub Profile
@rbecheras
rbecheras / GnuPG-2.2.md
Created July 6, 2020 13:52 — forked from romen/GnuPG-2.2.md
Build/install instructions for GnuPG 2.2.x on Ubuntu and similar distros (formerly for 2.1.x)

GnuPG 2.2.1 Build Instructions

Below are my build instructions for GnuPG 2.2.1, released on September 19th, 2017. These instructions are built for a Ubuntu 16.04 LTS.

If you prefer, you may use the below install script to install GnuPG 2.2.1 by running the following commands:

curl -OL "https://gist.github.com/romen/b7bac24d679d91acabb27bfcdabbee01/raw/b93b7b00910db67c2c3332606792679802abbb32/install-gnupg22.sh" && bash ./install-gnupg22.sh

Install the needed dependencies

@rbecheras
rbecheras / docker-cleanup-resources.md
Created November 16, 2018 11:23 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@rbecheras
rbecheras / libecw-build.sh
Created December 12, 2017 09:36 — forked from fritzvd/build.sh
libecw building for gdal
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable # unstable packages
sudo apt-get install build-essential gdal-bin gdal-config libgdal-ecw-src
wget http://meuk.technokrat.nl/libecwj2-3.3-2006-09-06.zip
unzip ~/Downloads/libecwj2-3.3.2006-09-06.zip
cd ~/Downloadslibecwj2-3.3.2006-09-06
./configure
make # wait
make install # or sudo make install
sudo gdal-ecw-build /usr/local
sudo ldconfig

Cheatsheet

Move cursor

command description
ctrl+a Move cursor to the start of the line
ctrl+e Move cursor to the end of the line
ctrl+b Move cursor back one character
ctrl+f Move cursor forward one character
@rbecheras
rbecheras / conv2vmx-ovf.py
Created November 22, 2017 21:26 — forked from eshizhan/conv2vmx-ovf.py
a script that can help import VMs into VMware ESXi from VirtualBox. tested vbox 4.2.18 and ESXi 5.1.
#!/usr/bin/env python
#
# usage:
# conv2vmx-ovf.py some-vm.ovf
#
# ref: http://www.cnblogs.com/eshizhan/p/3332020.html
#
import sys
fn = sys.argv[1]
@rbecheras
rbecheras / install.sh
Created June 27, 2017 08:15 — forked from zdne/install.sh
Install phantomjs 1.9.1 x64 on Ubuntu Precise
$ sudo apt-get install libfontconfig
$ cd /usr/local/share
$ sudo wget https://phantomjs.googlecode.com/files/phantomjs-1.9.1-linux-x86_64.tar.bz2
$ sudo tar xjf phantomjs-1.9.1-linux-x86_64.tar.bz2
$ sudo ln -s /usr/local/share/phantomjs-1.9.1-linux-x86_64/bin/phantomjs /usr/local/share/phantomjs
$ sudo ln -s /usr/local/share/phantomjs-1.9.1-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs
$ sudo ln -s /usr/local/share/phantomjs-1.9.1-linux-x86_64/bin/phantomjs /usr/bin/phantomjs
@rbecheras
rbecheras / xregexp-lookbehind2.js
Created September 12, 2016 08:48 — forked from slevithan/xregexp-lookbehind2.js
Simulating lookbehind in JavaScript (take 2)
// Simulating infinite-length leading lookbehind in JavaScript. Uses XRegExp.
// Captures within lookbehind are not included in match results. Lazy
// repetition in lookbehind may lead to unexpected results.
(function (XRegExp) {
function prepareLb(lb) {
// Allow mode modifier before lookbehind
var parts = /^((?:\(\?[\w$]+\))?)\(\?<([=!])([\s\S]*)\)$/.exec(lb);
return {
@rbecheras
rbecheras / DateFormat.js
Created June 1, 2016 15:32 — forked from eralston/DateFormat.js
Date Format 1.2.3 by Steven Levithan <stevenlevithan.com> - A date formatting library for JavaScript
/*
* Date Format 1.2.3
* (c) 2007-2009 Steven Levithan <stevenlevithan.com>
* MIT license
*
* Includes enhancements by Scott Trenda <scott.trenda.net>
* and Kris Kowal <cixar.com/~kris.kowal/>
*
* Accepts a date, a mask, or a date and a mask.
* Returns a formatted version of the given date.
@rbecheras
rbecheras / appconfig.js
Created May 4, 2016 14:39 — forked from AlexEscalante/appconfig.js
Ionic build with Browserify, development & production builds with sass, es6 transpiling, minification and more. Standard JS, no semicolons.
module.exports = {
default: {
// versionify will replace the following string with the actual version number
BUILD_VERSION: '__VERSION__'
},
development: {
API_URL: 'http://localhost:3000'
},
production: {
API_URL: 'http://acme.com'
@rbecheras
rbecheras / child_monitor.coffee
Created April 11, 2016 22:53 — forked from turtlesoupy/child_monitor.coffee
A node.js process supervisor and a sample use with health checks - see http://blog.argteam.com/coding/hardening-nodejs-production-process-supervisor/
{_} = require 'underscore'
child_process = require 'child_process'
async = require 'async'
healthCheckInterval = 60 * 1000
bounceInterval = 60 * 1000
bounceWait = bounceInterval + 30 * 1000
delayTimeout = (ms, func) -> setTimeout func, ms
class MonitoredChild