Skip to content

Instantly share code, notes, and snippets.

View milankragujevic's full-sized avatar

Milan Kragujević milankragujevic

View GitHub Profile

Introduction

Sometimes you may want to use a DNS server for specific domain requests and another DNS server for all other requests. This is helpful, for instance, when connected to a VPN. For hosts behind that VPN you want to use the VPN's DNS server but all other hosts you want to use Google's public DNS. This is called "DNS splitting."

Here, we run dnsmasq as a background service on macOS. The dnsmasq configuration described below implements DNS splitting.

Install

brew install dnsmasq
@milankragujevic
milankragujevic / enable_sshd.py
Created April 25, 2023 10:32 — forked from andyboeh/enable_sshd.py
Enable SSHD on the Aclatel HH40V (modify backup file)
#!/usr/bin/env python
import os
import sys
import subprocess
import tempfile
import struct
import shutil
import hashlib
@milankragujevic
milankragujevic / _update.sh
Last active May 8, 2021 10:53 — forked from lg/angry_wifi.sh
Auto disconnect WiFi clients with a low Received Signal Power on OpenWRT 19.07
rm /root/roaming_assistant.sh; wget http://10.25.100.10/roaming_assistant.sh -O /root/roaming_assistant.sh; chmod +x /root/roaming_assistant.sh
rm /root/monitor-ra.sh; wget http://10.25.100.10/monitor-ra.sh -O /root/monitor-ra.sh; chmod +x /root/monitor-ra.sh
rm /root/restart-ra.sh; wget http://10.25.100.10/restart-ra.sh -O /root/restart-ra.sh; chmod +x /root/restart-ra.sh
/root/restart-ra.sh
#!/usr/bin/perl -w
use IO::Socket ;
use IO::Handle ;
my $host = $ARGV[0] || "localhost";
my $port = $ARGV[1] || 8000;
STDERR->autoflush(1);
STDOUT->autoflush(1);
my $data = "";
@milankragujevic
milankragujevic / restart.sh
Created January 11, 2020 01:47 — forked from katallaxie/restart.sh
Automatically restart a CISCO 3208G on UMW
#!/bin/sh
usr=admin
pwd=atlanta
ip=192.168.0.1
tmp=/tmp/deviceRestart
cookies=cookies.txt
#improve the logread output
sqm_logger() {
@milankragujevic
milankragujevic / dante_setup.sh
Created August 10, 2019 11:02 — forked from gpchelkin/dante_setup.sh
How To Setup SOCKS5 Proxy Server for (not only) Telegram using Dante on Ubuntu 16.04 / 18.04
### NOT A SCRIPT, JUST A REFERENCE!
# install dante-server
sudo apt update
sudo apt install dante-server
# or download latest dante-server deb for Ubuntu, works for 16.04 and 18.04:
wget http://archive.ubuntu.com/ubuntu/pool/universe/d/dante/dante-server_1.4.2+dfsg-2build1_amd64.deb
# or older version:
wget http://ppa.launchpad.net/dajhorn/dante/ubuntu/pool/main/d/dante/dante-server_1.4.1-1_amd64.deb
@milankragujevic
milankragujevic / apa_1616_ir_codes.txt
Created January 15, 2018 09:54 — forked from tiegz/apa_1616_ir_codes.txt
APA 1616 LED Remote IR Codes
# http://sztyled.en.made-in-china.com/product/SqUmJxylhbhK/China-24-Key-Infrared-RGB-Manual-Flash-Controller-APA-1616-.html
# or
# http://www.dhgate.com/store/product/advanced-micro-control-unit-24-keys-rgb-led/128629434.html
IR Receiver Notes
F700FF BRIGHT HI
F7807F BRIGHT LO
F7408F OFF
F7C03F ON
F720DF R1