Skip to content

Instantly share code, notes, and snippets.

View nch3v's full-sized avatar

Nicolas Chevolot nch3v

View GitHub Profile
@nch3v
nch3v / gist:588ce03595675e3a1b0c9bbc26f3c90e
Created April 30, 2018 08:29
Kind of Promise.all using jQuery
function all(arrayOfPromises) {
return jQuery.when.apply(jQuery, arrayOfPromises).then(function() {
return Array.prototype.slice.call(arguments, 0);
});
};
@nch3v
nch3v / git prompt
Last active January 29, 2018 20:39
Yet another git prompt
# to add at the end of ~/.bashrc
RED="\[\033[0;31m\]"
YELLOW="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]"
BLUE="\[\033[0;34m\]"
LIGHT_RED="\[\033[1;31m\]"
LIGHT_GREEN="\[\033[1;32m\]"
WHITE="\[\033[1;37m\]"
LIGHT_GRAY="\[\033[0;37m\]"
COLOR_NONE="\[\e[0m\]"
@nch3v
nch3v / README.md
Created September 29, 2017 07:49
Docker helpers

These are useful docker commands:

alias docker_clean_images='docker rmi $(docker images -a --filter=dangling=true -q)'
alias docker_clean_ps='docker rm $(docker ps --filter=status=exited --filter=status=created -q)'
alias docker_clean_volumes='docker volume rm $(docker volume ls -qf dangling=true)'
@nch3v
nch3v / .gitconfig
Last active January 29, 2018 20:33
A good git configuration
[user]
name = Some One
email = some1@domain.com
[color]
# Enable colors in color-supporting terminals
ui = auto
[alias]
st = status -s
ci = commit
lg = log --graph --date=relative --pretty=tformat:'%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%an %ad)%Creset'
@nch3v
nch3v / install-global-npm-pkg.sh
Last active August 28, 2018 06:44
Usefull npm global package
#!/bin/sh
npm install -g npm@latest
npm install -g npm-check
npm install -g now
npm install -g serve
@nch3v
nch3v / README.md
Created January 10, 2017 12:13
Fix incompatible plugin error for KeePass on ubuntu 16.04

From [pfn/keepasshttp#242]

sudo apt-get install libmono-system-xml-linq4.0-cil libmono-system-data-datasetextensions4.0-cil libmono-system-runtime-serialization4.0-cil
sudo apt-get install mono-mcs
@nch3v
nch3v / update_git_svn_repos.sh
Created February 19, 2016 08:15 — forked from douglas/update_git_repos.sh
Update all git svn repositories under a base directory
#!/bin/bash
# store the current dir
CUR_DIR=$(pwd)
# Let the person running the script know what's going on.
echo -e "\n\033[1mPulling in latest changes for all repositories...\033[0m\n"
# Find all git repositories and update it to the master latest revision
@nch3v
nch3v / README.md
Last active November 4, 2016 13:59
Typescript mixins