Skip to content

Instantly share code, notes, and snippets.

@andybe
andybe / pihole local
Created October 10, 2020 17:38
pihole docker local
docker run \
--name=pihole \
-e TZ=Europe/Amsterdam \
-e WEBPASSWORD=password \
-e SERVERIP=127.0.0.1 \
-v pihole:/etc/pihole \
-v dnsmasq:/etc/dnsmasq.d \
-p 127.0.0.1:8082:80 \
-p 127.0.0.1:53:53/tcp \
-p 127.0.0.1:53:53/udp \
@andybe
andybe / static dummy adapter with ip
Last active October 31, 2020 10:44
static dummy adapter with ip
/etc/modules-load.d/dummy.conf
-------------------------------
dummy
/etc/modprobe.d/dummy.conf
---------------------------
install dummy /sbin/modprobe --ignore-install dummy numdummies=1;/sbin/ip link set dummy0 address A2:53:E9:F1:04:3B;/sbin/ip addr add 192.168.0.1/24 dev dummy0
change the interfache name can be done by add
@andybe
andybe / python 3.8 on debian buster
Created October 31, 2020 09:57
python 3.8 on debian buster
sudo apt-get install build-essential checkinstall
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev \
libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev
wget https://www.python.org/ftp/python/3.8.6/Python-3.8.6.tgz
tar xzf Python-3.8.6.tgz
cd Python-3.8.6
./configure --enable-optimizations --prefix=/opt/python/3.8
make -j$(nproc)
@andybe
andybe / python 3.9 on debian buster
Created October 31, 2020 10:01
python 3.9 on debian buster
sudo apt-get install build-essential checkinstall
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev \
libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev
wget https://www.python.org/ftp/python/3.9.0/Python-3.9.0.tgz
tar xzf Python-3.9.0.tgz
cd Python-3.9.0
./configure --enable-optimizations --prefix=/opt/python/3.9
make -j$(nproc)
@andybe
andybe / electron global installation
Created November 25, 2020 10:33
electron global installation
sudo -s (su -)
npm install -g electron --unsafe-perm=true --allow-root
chmod 4755 /usr/local/lib/node_modules/electron/dist/chrome-sandbox
exit
@andybe
andybe / chromium test drive on macOS complete
Last active November 27, 2020 13:25
chromium test drive on macOS complete (BigSur - Xcode)
mkdir Chromium
cd Chromium
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
cd depot_tools
export PATH=$(pwd):$PATH
cd ..
git config --global core.precomposeUnicode true
@andybe
andybe / Pihole docker-compose.yml
Last active March 6, 2021 18:48
Pihole docker-compose
version: "3"
services:
pihole:
image: pihole/pihole
container_name: pihole
restart: unless-stopped
ports:
- 127.0.0.1:8082:80
- 127.0.0.1:53:53/tcp
@andybe
andybe / Mariadb OSX
Last active May 12, 2021 13:06
Mariadb OSX
#!/bin/bash
VERSION=10.5.10
PREFIX=/Library/Modules/Databases/Mariadb/$VERSION \
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX \
-DINSTALL_DOCDIR=share/doc/mariadb-$VERSION \
-DINSTALL_DOCREADMEDIR=share/doc/mariadb-$VERSION \
-DINSTALL_MANDIR=share/man -DINSTALL_MYSQLSHAREDIR=share/mysql \
-DINSTALL_MYSQLTESTDIR=share/mysql/test -DINSTALL_PLUGINDIR=lib/mysql/plugin \
-DINSTALL_SBINDIR=sbin -DINSTALL_SCRIPTDIR=bin -DINSTALL_SQLBENCHDIR=share/mysql/bench \
-DINSTALL_SUPPORTFILESDIR=share/mysql -DMYSQL_DATADIR=/var/lib/mysql \
@andybe
andybe / TMUX
Last active January 24, 2024 17:34
Tmux static build on Mac OSX with command-line tools only
https://libevent.org
tar xf libevent-2.1.12-stable.tar.gz
cd libevent-2.1.12-stable
./configure --enable-static --disable-shared --disable-openssl --prefix=/tmp/libevent
make install
cd ..
https://github.com/tmux/tmux/releases/tag/3.3a
tar xf tmux-3.3.a.tar.gz
cd tmux-3.3a