Skip to content

Instantly share code, notes, and snippets.

@andriytk
andriytk / qemu-on-mac-nat.md
Last active September 2, 2024 22:31
Configure NAT-network for QEMU on macOS Mojave

Configure NAT-network for QEMU on macOS Mojave

Prerequisites:

  1. Install qemu via MacPorts.
  2. Install tuntap via brew.

Steps:

  1. Add a bridge with some Thunderbolt interface via System Preferences -> Network -> Manage Virtual interfaces:
@fopina
fopina / portquiz.py
Last active January 8, 2022 17:30
portquiz.net quick tester
# directly from
# https://docs.python.org/3/library/concurrent.futures.html#threadpoolexecutor-example
import concurrent.futures
import urllib.request
def check_port(port):
print('testing %d \r' % port, end='')
# smaller response text!
r = urllib.request.Request('http://portquiz.net:%d' % port, headers={'User-Agent': 'curl'})
@davps
davps / install-nodejs-on-raspberrypi-armv6.md
Last active September 22, 2024 18:46
Steps to install nodejs on Raspberry Pi B+ (armv6)

Steps to install nodejs v6.2 on Raspberry Pi B+ (armv6)

cd ~
wget http://nodejs.org/dist/v6.2.1/node-v6.2.1-linux-armv6l.tar.gz
tar -xzf node-v6.2.1-linux-armv6l.tar.gz
node-v6.2.1-linux-armv6l/bin/node -v

The last command should print v6.2.1.

Now you can copy it to /usr/local

@gbaman
gbaman / HowToOTGFast.md
Last active October 31, 2024 23:33
Simple guide for setting up OTG modes on the Raspberry Pi Zero, the fast way!

Setting up Pi Zero OTG - The quick way (No USB keyboard, mouse, HDMI monitor needed)

More details - http://blog.gbaman.info/?p=791

For this method, alongside your Pi Zero, MicroUSB cable and MicroSD card, only an additional computer is required, which can be running Windows (with Bonjour, iTunes or Quicktime installed), Mac OS or Linux (with Avahi Daemon installed, for example Ubuntu has it built in).
1. Flash Raspbian Jessie full or Raspbian Jessie Lite onto the SD card.
2. Once Raspbian is flashed, open up the boot partition (in Windows Explorer, Finder etc) and add to the bottom of the config.txt file dtoverlay=dwc2 on a new line, then save the file.
3. If using a recent release of Jessie (Dec 2016 onwards), then create a new file simply called ssh in the SD card as well. By default SSH i