Skip to content

Instantly share code, notes, and snippets.

Pieter Scheffers PieterScheffers

Block or report user

Report or block PieterScheffers

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View makefile_windows.txt
https://www.oreilly.com/library/view/managing-projects-with/0596006101/ch07.html
@PieterScheffers
PieterScheffers / transip_stack_clear_trash.sh
Last active Mar 19, 2019
TransIP Stack - Clear Trash
View transip_stack_clear_trash.sh
#!/bin/sh
STACK_URL=myuser.stackstorage.com
STACK_USER=myuser
STACK_PASSWORD=nooneknowsthis
curl \
--silent \
-X POST \
-H "Content-Type: application/json" \
@PieterScheffers
PieterScheffers / trello_add_week.js
Created Mar 19, 2019
Trello add a list for each weekday
View trello_add_week.js
// Trello
// Add a List for each weekday
// Pass throught https://skalman.github.io/UglifyJS-online/
// Then add 'javascript:' before the code
// and add 'void(0);' after the code
// Add a bookmark in Chrome and put this as the url
(function () {
function getLastDate (lastDate = null) {
@PieterScheffers
PieterScheffers / .bashrc
Last active Apr 23, 2019
Download new kubeconfig when it is older as 6 days for DigitalOcean kubernetes
View .bashrc
#!/usr/bin/env bash
# DigitalOcean Kubernetes
# The kubeconfig you download from DigitalOcean invalidates every 7 days
# By appending this to your .bashrc file the kubeconfig gets refreshed every 6 days
#
# Pre
# - install 'doctl': https://github.com/digitalocean/doctl#installing-doctl
# - auth with DigitalOcean API token: https://github.com/digitalocean/doctl#authenticating-with-digitalocean
#
View minimal-analytics-snippet.js
(function (context, trackingId, options) {
const history = context.history;
const doc = document;
const nav = navigator || {};
const storage = localStorage;
const encode = encodeURIComponent;
const pushState = history.pushState;
const typeException = 'exception';
const generateId = () => Math.random().toString(36);
const getId = () => {
@PieterScheffers
PieterScheffers / bash-compose.sh
Created Oct 15, 2018
Compose multiple service like docker-compose without docker
View bash-compose.sh
#!/bin/bash
mkdir -p logs
npm install
lerna bootstrap
# Start RabbitMQ / Redis and Mongodb
docker-compose -f docker/docker-compose.yml up -d
sleep 10
View git_cheatsheet.sh
# Force push
git push --force
# Pull origin when origin has been force pushed (from master branch)
git reset --hard origin/master
# Base feature branch on new force-pushed master
# Assumes feature branch has 2 commits
git rebase HEAD~2 myfeature --onto master
@PieterScheffers
PieterScheffers / trello_week.js
Created Aug 2, 2018
Trello - Add week (Dutch weekdays)
View trello_week.js
// Trello
// Add a List for each weekday
// Pass throught https://skalman.github.io/UglifyJS-online/
// Then add 'javascript:' before the code
// and add 'void(0);' after the code
// Add a bookmark in Chrome and put this as the url
(function () {
function getLastDate (lastDate = null) {
@PieterScheffers
PieterScheffers / docker-tail-all.bash
Created Jul 22, 2018
Tail all running Docker containers
View docker-tail-all.bash
#!/bin/bash
# Source: https://stackoverflow.com/questions/32076878/logging-solution-for-multiple-containers-running-on-same-host
# Creator: Nate
names=$(docker ps --format "{{.Names}}")
echo "tailing $names"
while read -r name
do
@PieterScheffers
PieterScheffers / OpenWithSublimeText.bat
Created Apr 10, 2018
Add "Open with Sublime Text 3" to Windows Explorer Context Menu for folders and inside folders
View OpenWithSublimeText.bat
@echo off
SET st3Path=C:\Program Files\Sublime Text 3\sublime_text.exe
rem add it for folders
@reg add "HKEY_CLASSES_ROOT\Directory\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
@reg add "HKEY_CLASSES_ROOT\Directory\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st3Path%,0" /f
@reg add "HKEY_CLASSES_ROOT\Directory\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st3Path% \"%%1\"" /f
rem add it for inside folders
@reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Background\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
You can’t perform that action at this time.