Skip to content

Instantly share code, notes, and snippets.

@tibovanheule
tibovanheule / BlockYouTubeHostsFile
Created January 1, 2019 23:51 — forked from marshyyyy/BlockYouTubeHostsFile
Block YouTube Hosts File
0.0.0.0 host.youtube.com
0.0.0.0 mx.youtube.com
0.0.0.0 admin.youtube.com
0.0.0.0 devel.youtube.com
0.0.0.0 stats.youtube.com
0.0.0.0 http.youtube.com
0.0.0.0 mx0.youtube.com
0.0.0.0 administration.youtube.com
0.0.0.0 development.youtube.com
0.0.0.0 svn.youtube.com
@tibovanheule
tibovanheule / .md
Last active September 5, 2023 07:10 — forked from joepie91/.md
Running a Node.js application using nvm as a systemd service

Trickier than it seems.

1. Set up nvm

Let's assume that you've already created an unprivileged user named myapp. You should never run your Node.js applications as root!

Switch to the myapp user, and do the following:

  1. curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash (however, this will immediately run the nvm installer - you probably want to just download the install.sh manually, and inspect it before running it)
  2. Install the latest stable Node.js version: nvm install stable
@tibovanheule
tibovanheule / README.md
Created May 12, 2019 10:25 — forked from lopspower/README.md
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

All hex value from 100% to 0% alpha:

@tibovanheule
tibovanheule / post-merge
Last active August 30, 2019 15:48 — forked from sindresorhus/post-merge
git hook to run a command after `git pull` if a specified file was changed.In this example it's used to run `npm install` if package.json changed and `bower install` if `bower.json` changed.Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
#!/usr/bin/env bash
changed_files="$( git diff-tree -r --name-only --no-commit-id origin/master HEAD)"
changed() {
echo "$changed_files" | wc -l | grep --quiet "[123456789]*" && eval "$1"
}
check_run() {
echo "$changed_files" | grep --quiet "$1" && eval "$2"
}
@tibovanheule
tibovanheule / iconv-l.txt
Created July 12, 2023 07:55 — forked from hakre/iconv-l.txt
Iconv List of Encodings
ANSI_X3.4-1968 ANSI_X3.4-1986 ASCII CP367 IBM367 ISO-IR-6 ISO646-US ISO_646.IRV:1991 US US-ASCII CSASCII
UTF-8
ISO-10646-UCS-2 UCS-2 CSUNICODE
UCS-2BE UNICODE-1-1 UNICODEBIG CSUNICODE11
UCS-2LE UNICODELITTLE
ISO-10646-UCS-4 UCS-4 CSUCS4
UCS-4BE
UCS-4LE
UTF-16
UTF-16BE
@tibovanheule
tibovanheule / configMacPortsMongo.md
Created March 24, 2024 21:44 — forked from Olliebrown/configMacPortsMongo.md
Configuring MongoDB installed from MacPorts

This is based on https://github.com/codeforamerica/ohana-api/wiki/Installing-MongoDB-with-MacPorts-on-OS-X

the macports version of MongoDB does not come pre-configured and will not run after installing until you change some settings. The instructions linked above describe a way to fix this but they ignore the fact that many of the directories are already created and owned by the user "_mongo". It also runs the daemon as root rather than _mongo. Below is a modified approach that uses the _mongo user and avoids creating unnecessary directories.

Install and Configure MongoDB

  1. Install mongodb with sudo port install mongodb (you probably want to start with a sudo port selfupdate)
  2. Create configuration directory with sudo mkdir /opt/local/etc/mongodb/
  3. Create configuration file with sudo pico /opt/local/etc/mongodb/mongod.conf

This script will wait untill the last 2 sec of a vakantieveilingen.nl auction and place a bid as soon as you ar no longer the highest bidder. This while keeping the max value in to account. It will check the bidding every 0,2 sec.

  1. Open a auction on vakantieveilingen.nl
  2. Change the maxBid to the value you want to maximum spend. (whole euro's only)
  3. Open the developer console in your browser (how do i do this?)
  4. Paste the code in the console and hit enter