This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I often setup virtual machines as pure headless machines with different linux distros. | |
# However, as the virtualbox GUI doesn't support c&p, scp and so on, ssh access is desired. | |
# As most distros forbid password-based login for the root account (which is great under normal conditions!) | |
# it'd be neccessary to either type in the hosts ssh key manually or use a temporary account. | |
# This simple bash macro (which assumes the personal ssh-keypair lies at `~/.ssh/id_rsa.pub`) types in a command | |
# and copies over the ssh key using simulated keypresses (May not work if host and guest have different keymaps!) | |
# Only argument is the UUID or machine name of the desired machine. | |
# After the key is typed in, please manually check the typed in command and press enter | |
function addsshkey() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Notes: AVM's FritzBox-Routers normally generate broadcast Homeplug-AV | |
# pakets nearly every second (used to allow for PnP-setup of these devices). | |
# As these pakets are responsible for a significant amount of Airtime, | |
# these should be blocked. | |
# Additionally, broadcast pakets on wifi prevent many devices from sleeping, | |
# and need to be transferred in legacy-rates, further bloating up the amount of wasted airtime. | |
# This script assumes the OpenWRT APs are 'dumb APs', whith a L2-Bridge between | |
# the wired and the wireless interfaces, were ebtables can block pakets based | |
# on their ethertype. (To check: ifconfig should only show wlan*, eth*, br-lan and lo interfaces) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <mosquitto.h> | |
// compile with | |
// gcc -o connect_test -lmosquitto -pthread connect_test.c | |
// run with | |
// ./connect_test |