Skip to content

Instantly share code, notes, and snippets.

View mvanduijker's full-sized avatar
👨‍👩‍👦‍👦 💻 🎸

Mark van Duijker mvanduijker

👨‍👩‍👦‍👦 💻 🎸
  • The Netherlands
View GitHub Profile
mvanduijker /
Created January 10, 2022 14:20
bash script to buy crypto on bitvavo you can use for dca
#!/usr/bin/env bash
# Script to buy crypto through at market price, so you can automate for DCA (Dollar Cost Averaging)
# Request API KEY and API Secret in your bivavo account with trade permissions
# Pass in api key and secret as environment variables to the script
# Argument 1 is for quote amount (default: 10)
# Argument 2 is for market (default: BTC-EUR)
# Examples:
mvanduijker /
Last active April 15, 2023 19:27
Dollar averaging buy 10 euro of bitcoin with kraken api and it's cli
set -e
# Install kraken cli ( and put this script in same path
# Make sure the following tools are installed: bc, jq
# To make a daily trade add this script in your cron
# Use offical pair, check them with ./ AssetPairs | jq
mvanduijker / gist:138ee8958f0e3c9627d93004731a7475
Created August 29, 2017 12:08
google page speed jpeg optimisation
# First stage: strip all comments, this will ALWAYS reduce size
jpegoptim --max=85 --strip-all --strip-com --strip-exif --strip-iptc --strip-icc $1
# Second stage: do an progressive scan apart which may produce bigger images in some scenarios
jpegoptim --all-progressive $1
mvanduijker / gist:d12383eaac6e1532f5844103c344407b
Created August 23, 2017 19:21
Create clip from video without re-encoding (fast!)
ffmpeg -i in.mp4 -ss 00:10:00 -to 00:20:00 -c copy out.m4v
mvanduijker / HtmlMiniRenderer.rb
Created May 29, 2017 17:32
CommonMark Html Mini Renderer only renders subset of commonmark. Should be good for stuff like user comments where minimal markup is required / desired
# Proof of concept to use CommonMarker to only render a subset of CommanMark language
# Good if you only want links, em, strong, etc where minimal markup is desired.
# Example:"# Test"))
class HtmlMiniRenderer < CommonMarker::HtmlRenderer
mvanduijker /
Created February 8, 2016 19:10
WhatsApp Mac OSX app
nativefier --name "WhatsApp" --width 700px --height 800px -o --counter --icon whatsapp.png ''
mvanduijker / gist:4bd7b3a8d7956f01c8c0
Created November 6, 2015 08:20
Doctrine2 repository as a symfony2 service
class: Doctrine\ORM\EntityRepository
factory_service: doctrine.orm.default_entity_manager
factory_method: getRepository
- Acme\Entity\YourEntity
mvanduijker / gist:9bc56a9b13a07aa7f8c5
Created June 13, 2014 18:59
Mirror website with wget
wget -E -H -k -K -p -e robots=off
mvanduijker / pagination.php
Created December 11, 2013 16:10
Standard pagination.php to create a override in your template for joomla 2.5 websites
* Pagination template override
* Functions to override joomla standard behaviour
* From JPagination::_list_render
* @param $list
mvanduijker /
Created January 12, 2013 12:27
Simple script to export iTunes library to mp3. (use it for my car radio usb stick) You need faad and lame Tested on mac brew install faad2 lame
itunes_folder="/Users/MacBookPro/Music/iTunes/iTunes Media/Music"
if [ ! -d "$output_folder" ]; then
mkdir -p "$output_folder"
find "$itunes_folder" -type f | while read FILENAME;
file=$(basename "$FILENAME")