Skip to content

Instantly share code, notes, and snippets.

View marcelblijleven's full-sized avatar
:octocat:
Loading...

Marcel Blijleven marcelblijleven

:octocat:
Loading...
View GitHub Profile
@marcelblijleven
marcelblijleven / spotify.bash
Created February 21, 2018 13:41
Spotify proxy aliases
# Spotify Proxy settings
alias spotify_proxy_on='sed -i -e "s/network.proxy.mode=1/network.proxy.mode=2/" ~/Library/Application\ Support/Spotify/prefs'
alias spotify_proxy_off='sed -i -e "s/network.proxy.mode=2/network.proxy.mode=1/" ~/Library/Application\ Support/Spotify/prefs'
@marcelblijleven
marcelblijleven / docker-commands.sh
Last active October 26, 2017 09:16
Useful docker commands
# list running containers
docker ps
# list just the container id's (quiet)
docker ps -q
# list all containers (all)
docker ps -a
# filter containers on status
@marcelblijleven
marcelblijleven / toBeBetween.js
Created October 4, 2017 08:26
Jest: expect to be between two numbers
expect.extend({
toBeBetween(received, argumentOne, argumentTwo) {
if (argumentOne > argumentTwo) {
// Switch values
[argumentOne, argumentTwo] = [argumentTwo, argumentOne];
}
const pass = (received >= argumentOne && received <= argumentTwo);
if (pass) {