Skip to content

Instantly share code, notes, and snippets.

Matthieu Vachon maoueh

Block or report user

Report or block maoueh

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
maoueh / index.js
Last active Aug 29, 2019
A quick script to play with Promise nesting and resolution (node index.js)
View index.js
function buildPromise(tag, shouldError) {
if (shouldError) {
return new Promise((resolve, reject) => {
console.log(tag + " executor")
setTimeout(() => { console.log(tag + " rejecting!"); reject(tag + " failed on purpose") }, 250)
return new Promise((resolve, reject) => {
console.log(tag + " executor")
maoueh / shellscript.json
Last active Jun 21, 2019
VS Code Shellscript Snippets for a Bash Boilerplate script (developer script)
View shellscript.json
"Bash script boilerplate": {
"prefix": "bshb",
"body": [
"#!/usr/bin/env bash",
"ROOT=\"$( cd \"$( dirname \"\\${BASH_SOURCE[0]\\}\" )\" && pwd )\"",
"main() {",
" current_dir=\"`pwd`\"",
maoueh / main.go
Last active Jan 17, 2019
golang gorilla mux sub/router + specific middleware per subrouter
View main.go
package main
import (
func main() {
View shell find Kodi MySQL videos duplicate
# From shell command line, with a MySQL database dump of the videos database, this
# shell command line will print all the duplicates duplicate string.
# Replace the `<...>` string by actual values for your system. Also, I use
# hard-coded IP in my database which result in the used Regex
# (`"'smb://.+?/.+?\.([a-zA-Z0-9]+)'"`). It's general enough but you might need
# to update it to your needs.
# OS: Mac OS X (10.11.6)
View Test bitrise docker install env
- git::
title: Install Docker
- script@1.1.3:
title: Build image
- content: |-
set -ex
maoueh /
Created Aug 24, 2016
Simple Uris Java helper
* Unlicense granted <>
public final class Uris {
* An unchecked version of the {@link URI#URI(String)} construction, i.e. a version that does not throw {@link
maoueh /
Created Jun 2, 2016
Small script to test changes made to cloud init config without rebooting
rm -rf /var/lib/cloud/instance && rm -rf /var/lib/cloud/instances/* && rm -rf /var/lib/cloud/sem/*
cloud-init init && cloud-init modules --mode config && cloud-init modules --mode final
maoueh / cookbooks_app_recipes_default.rb
Last active Dec 9, 2015
Chef bug custom resources and include_recipe
View cookbooks_app_recipes_default.rb
# cookbooks/app/recipes/default.rb
include_recipe 'common::default'
maoueh /
Last active Apr 17, 2019
Build steps to create a (cross-)compiler creating native code executable targeting raspberry pi (RPi), running on MSYS2 and using MSYS2 to compile the cross-compiler

Build Steps

This document details extra that were needed to build the rpi cross-compiler on MSYS2. The original instructions are located on gurucodings.

This cross-compiler has been created targeting the Raspbian Wheezy OS which is based on Debian Wheezy with special support for the Raspberry PI architecture. The version that was installed on my rpi is 2014-06-20-wheezy-raspbian.

Here the version of the various tools currently present in this version of Raspbian (Guest OS):

  • gcc (Debian 4.6.3-14+rpi1) 4.6.3
  • GNU ld (GNU Binutils for Debian) 2.22
maoueh / stunnel
Last active Aug 27, 2015
Service definition for stunnel (Tested on CentOS 6.5)
View stunnel
# Script to run stunnel in daemon mode at boot time.
# Check for the
# most up-to-date version of this script.
# This script is realeased under the terms of the GPL.
# You can source a copy at:
You can’t perform that action at this time.