Skip to content

Instantly share code, notes, and snippets.

View it-can's full-sized avatar

M. Vugteveen it-can

View GitHub Profile
@djmaze
djmaze / README.md
Last active May 5, 2021 09:35
Boosting Docker performance on OSX via NFS mounts

Run the script from this post in order to set up NFS:

curl -sL https://gist.githubusercontent.com/seanhandley/7dad300420e5f8f02e7243b7651c6657/raw/fdd77fe66cf9ce893fa0175d735cbede2bb065e4/setup_native_nfs_docker_osx.sh >/tmp/setup_native_nfs_docker_osx.sh 
bash /tmp/setup_native_nfs_docker_osx.sh
rm /tmp/setup_native_nfs_docker_osx.sh

Copy the supplied docker-compose.override.yml to your project directory. Adjust the version (version), service name (app) and the app path (/usr/src/app) according to the app service definition in your existing docker-compose.yml.

@soderlind
soderlind / Install.txt
Last active September 7, 2024 05:45
macOS DoH! (DNS over HTTPS) using cloudflared
1) Install cloudflared using homebrew:
brew install cloudflare/cloudflare/cloudflared
2) Create /usr/local/etc/cloudflared/config.yaml, with the following content
proxy-dns: true
proxy-dns-upstream:
- https://1.1.1.1/dns-query
- https://1.0.0.1/dns-query
@rafaelfess
rafaelfess / README.md
Last active August 14, 2024 13:27
EdgeOS: Scheduled PPPoE reconnect configuration #EdgeRouter

EdgeOS: Scheduled PPPoE reconnect configuration

It will restart the PPPoE connection every day at 7a.m

The benefit to using the task-scheduler is that your commands get saved in config folder which ensures that they get copied over during firmware upgrades.

Creating the script file

cd /config/user-data && sudo mkdir scripts && sudo chown root scripts && cd scripts
@Ruben-E
Ruben-E / edgerouter-x.md
Last active December 12, 2025 15:52
Configure EdgeRouter X for KPN fiber / glasvezel

Setup interface eth1 and configure the DHCP/DNS server

configure
 
set interfaces ethernet eth1 address 192.168.2.254/24
set interfaces ethernet eth1 description "eth1 - LAN"
set interfaces ethernet eth1 duplex auto
set interfaces ethernet eth1 speed auto
 
@demisang
demisang / AesCipher.java
Last active December 9, 2024 10:20
AES/CBC/PKCS5Padding encrypt/decrypt PHP and JAVA example classes
import android.support.annotation.Nullable;
import android.util.Base64;
import java.nio.ByteBuffer;
import java.security.SecureRandom;
import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
@andrewdelprete
andrewdelprete / webpack.mix.js
Last active August 28, 2024 21:30
Laravel Mix: Tailwind CSS + PurgeCSS Example
let mix = require("laravel-mix");
let tailwindcss = require("tailwindcss");
let glob = require("glob-all");
let PurgecssPlugin = require("purgecss-webpack-plugin");
/**
* Custom PurgeCSS Extractor
* https://github.com/FullHuman/purgecss
* https://github.com/FullHuman/purgecss-webpack-plugin
*/
@Jamesits
Jamesits / ubuntu_enable_bbr.sh
Last active December 13, 2022 22:27
Ubuntu enable BBR
#!/bin/bash
set -eu
SYSCTL_FILE=/etc/sysctl.d/90-tcp-bbr.conf
# check root
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
@jadwigo
jadwigo / lookup-provincie.php
Created August 16, 2017 10:44
Lookup Nederlandse provincie ahv. cijfers van de postcode
<?php
/**
* Lookup provincie ahv postcode:
* https://nl.wikipedia.org/wiki/Postcodes_in_Nederland
*
* @param $postcode
*
* @return string
*/
function lookupProvincie($postcode) {
@quelleck
quelleck / rpi-hdmi.sh
Last active December 15, 2025 15:16 — forked from AGWA/rpi-hdmi.sh
Enable and disable the HDMI port on the Raspberry Pi: `rpi-hdmi on` to turn on, `rpi-hdmi off` to turn off.
#!/bin/sh
# Enable and disable HDMI output on the Raspberry Pi
is_off ()
{
vcgencmd display_power | grep "display_power=0" >/dev/null
}
case $1 in
@lewinski-xyz
lewinski-xyz / gist:e6653862d8c79aa59abd32f9f9d99181
Created October 20, 2016 20:30
Git add push only remote
git remote set-url --add --push origin <repo-url-here>