Skip to content

Instantly share code, notes, and snippets.

@EmbeddedAndroid
EmbeddedAndroid / qemu-ifup
Created September 15, 2013 17:24
Mac OSX (10.8.X) /etc/qemu-ifup script for QEMU/KVM bridged networking.
#!/bin/bash
echo "Executing /etc/qemu-ifup"
echo "Creating bridge"
sysctl -w net.link.ether.inet.proxyall=1
sysctl -w net.inet.ip.forwarding=1
sysctl -w net.inet.ip.fw.enable=1
ifconfig bridge0 create
echo "Bringing up $1 for bridged mode"
ifconfig $1 0.0.0.0 up
echo "Add $1 to bridge"
@artembeloglazov
artembeloglazov / qemu-ifdown
Last active August 4, 2020 07:32 — forked from EmbeddedAndroid/qemu-ifup
Mac OSX (10.8.X) scripts for QEMU/KVM bridged networking with nat on en1.
#!/bin/bash
echo "Executing /etc/qemu-ifdown"
echo "Bringing TAP interface down"
ifconfig $1 down
echo "Removing interfaces"
ifconfig bridge0 deletem en1 deletem $1
echo "Bring down bridge"
ifconfig bridge0 down
echo "Removing bridge"
ifconfig bridge0 destroy
@eyecatchup
eyecatchup / setlogprops.sh
Last active May 24, 2016 09:10
Shell script to use on Android systems to enforce VERBOSE logging for a bunch of system-relevant internal services / processes. (Needs to be executed with root permissions!)
#!/system/xbin/sh
#LEVEL=$1
LEVEL="VERBOSE"
PROPS="
AndroidRuntime
ActivityManager
ActivityThread
PackageManager
@iMilnb
iMilnb / collectd.conf
Last active October 10, 2018 21:33
collectd-python plugin to read data from ethermine.org
<Plugin python>
ModulePath "/home/imil/collectd"
Import "ethermine"
<Module ethermine>
wallet "0xf00f00f00"
interval "300"
url "https://ethermine.org/api/miner_new"
</Module>
</Plugin>