Skip to content

Instantly share code, notes, and snippets.

assert [] != null
assert [] instanceof ArrayList
assert ![]
assert [1, 2]
assert [1, 2] + [3, 4] == [1, 2, 3, 4]
assert [1, 2] != [2, 1]
@xsenechal
xsenechal / linux.sh
Last active January 18, 2019 09:48
Linux stuff
#keyboard layout
dpkg-reconfigure keyboard-configuration
#change user password
sudo passwd user
#install xorg & dwm (a dynamic window manager for Xorg)
wget http://dwm.suckless.org/ **tar.gz
tar -xvf *.tar.gz
@xsenechal
xsenechal / gist:1792c51a0ba3c2c3123a
Last active August 29, 2015 14:24
Jenkins continuous deploy for nodejs
#install NodeJS plugin, then in the global settings, create a NodeJS install
#in the job config check the box "Provide Node & npm bin/ folder to PATH"
export http_proxy="http://user:pwd@domain:8080"
export https_proxy="http://user:pwd@domain:8080"
echo $path
node --version
bower --version
npm install
@xsenechal
xsenechal / parseWadl.groovy
Last active September 8, 2015 08:46
Application wadl to CSV
def parser = new XmlParser()
def result = parser.parseText("<?xml ...</application>")
def lst = []
def url = "/rest"
def url2
def url3
def httpMethod
def javaMethod
def responseType
mkdir deisv2 && cd deisv2
# install deis cli
curl -sSL http://deis.io/deis-cli/install-v2.sh | bash
cp deis ~/bin/deisv2
ln -fs ~/bin/deisv2 /usr/local/bin/deis
# install helmc (kubernetes package manager)
curl -s https://get.helm.sh | bash
cp helmc ~/bin/helmc
# http://kubernetes.io/docs/getting-started-guides/minikube/
# install kubectl
curl -Lo kubectl http://storage.googleapis.com/kubernetes-release/release/v1.3.0/bin/darwin/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
# install minikube
# https://github.com/kubernetes/minikube/releases
curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.9.0/minikube-darwin-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
@xsenechal
xsenechal / xamppvm.sh
Last active September 25, 2019 07:14
######### Install xampvm ###################
# https://www.apachefriends.org/download.html
######### Ajout d'un vhost ###################
1. Se connecter en "SSH" adans la VM.
2. Dans le fichier /opt/lampp/etc/httpd.conf, décommenter la ligne
Include etc/extra/httpd-vhosts.conf
3. dans le fichier /opt/lampp/etc/extra/httpd-vhosts.conf, ajoute les lignes suivantes
# remove all docker containers, images, ...
du -hs ~/Library/Containers/com.docker.docker
docker system prune -a
# empty download folder
rm -rf ~/Downloads/*
# empty maven files
rm -rf ~/.m2/repository/* ~/.m2/wrapper/*
@xsenechal
xsenechal / install_git.sh
Created October 30, 2020 11:06 — forked from fraserxu/install_git.sh
setup nodenv on ubuntu
#!/bin/bash
set -ex
sudo apt-get update
sudo apt-get install -y git