Skip to content

Instantly share code, notes, and snippets.

View MatthieuLemoine's full-sized avatar

Matthieu Lemoine MatthieuLemoine

View GitHub Profile
@MatthieuLemoine
MatthieuLemoine / 1_install_lets_encrypt
Last active May 24, 2016 13:13
nginx + Let's encrypt = <3
#!/bin/bash
sudo apt-get install git bc
sudo git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt
sudo mkdir /var/www/letsencrypt
sudo chown www-data /var/www/letsencrypt
@MatthieuLemoine
MatthieuLemoine / compileKernelModules.sh
Last active June 29, 2016 08:56
Virtual Box compile kernel modules
#!/bin/bash
/etc/init.d/vboxdrv setup
ssh -D 5555 -N <host>
@MatthieuLemoine
MatthieuLemoine / tomcat_remote_debugging
Created August 10, 2016 09:45
Tomcat remote debugging
ssh -f <remote-host> -L <local-port>:127.0.0.1:<remote-port> -N
@MatthieuLemoine
MatthieuLemoine / couchdb-pbkdf2.js
Created September 13, 2016 10:09
Verify hash on CouchDB
const crypto = require('crypto');
const basicAuthToken = 'Yaaadfg9obGk6YTmleDI0ZGJiZg==';
const authToken = new Buffer(basicAuthToken, 'base64').toString('ascii');
const [username, password] = authToken.split(':');
const derivedKey = 'YaaadYaaadf569da661ac474db5d229547595a33';
const salt = 'YaaadfYaaadfd91037e9aa67e946f692';
const iterations = 10;
@MatthieuLemoine
MatthieuLemoine / .node.eslintrc.json
Last active September 26, 2016 09:35
Node ES6 eslint config
{
"extends": "airbnb",
"env" : {
"node" : true
},
"ecmaFeatures": {
"modules" : false
},
"rules" : {
"no-multi-spaces" : 0,
@MatthieuLemoine
MatthieuLemoine / .zshrc
Created October 1, 2016 16:23
Zsh config
ZSH_THEME="spaceship"
plugins=(git command-not-found ubuntu npm web-search)
alias zshconfig="vim ~/.zshrc"
alias ohmyzsh="vim ~/.oh-my-zsh"
alias reload="source ~/.zshrc"
@MatthieuLemoine
MatthieuLemoine / eslint
Last active December 15, 2016 17:22
Linter
npm i -D eslint eslint-config-airbnb eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-react
@MatthieuLemoine
MatthieuLemoine / postbuild.js
Last active February 6, 2017 10:21
Post babel build. Copy missing files.
#!/usr/bin/env node
const glob = require('glob');
const fs = require('fs');
const sh = require('shelljs');
const SRC_DIR = 'src';
const DEST_DIR = 'build';
glob(`${SRC_DIR}/**/*(*.json|!(*.js))`, (err, files) => {
if (err) {
@MatthieuLemoine
MatthieuLemoine / .hyper.js
Last active February 20, 2017 17:06
Hyperterm sync settings
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 12,
// font family with optional fallbacks
fontFamily: 'Menlo, "DejaVu Sans Mono", "Lucida Console", monospace',
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk)
cursorColor: '#fff',