Skip to content

Instantly share code, notes, and snippets.

View MatthieuLemoine's full-sized avatar

Matthieu Lemoine MatthieuLemoine

View GitHub Profile
@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 / .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 / 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;
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@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
ssh -D 5555 -N <host>
@MatthieuLemoine
MatthieuLemoine / ssh_config
Last active May 2, 2017 15:26
SSH config proxy host
# ~/.ssh/config
Host <custom-name>
HostName <remote-host>
User <remote-user>
Port <remote-ssh-port>
IdentityFile ~/.ssh/id_rsa
ForwardAgent yes
ProxyCommand ssh -o 'ForwardAgent yes' <proxy-user>@<proxy-host> 'ssh-add && nc %h %p'
@MatthieuLemoine
MatthieuLemoine / compileKernelModules.sh
Last active June 29, 2016 08:56
Virtual Box compile kernel modules
#!/bin/bash
/etc/init.d/vboxdrv setup
@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