Skip to content

Instantly share code, notes, and snippets.

View vimagick's full-sized avatar
🐰
🐰🐰🐰🐰🐰🐰🐰🐰🐰

K̶e̶v̶i̶n̶ vimagick

🐰
🐰🐰🐰🐰🐰🐰🐰🐰🐰
View GitHub Profile
@vimagick
vimagick / blescan.sh
Last active February 6, 2024 03:35
hcitool lescan (with 30 sec window)
#!/bin/bash
set -euo pipefail
BLE_DEV=hci0
DEDUP_WINDOW=30
MQTT_BROKER=broker.hivemq.com
MQTT_PORT=8883
MQTT_QOS=2
MQTT_TOPIC=blescan
@itsmikita
itsmikita / macos-iso.md
Last active May 10, 2025 20:21
Extract ISO image from macOS Somona installer
@acarril
acarril / bootable-win-on-mac.md
Created November 18, 2022 17:49
Create a bootable Windows USB using macOS

For some reason, it is surprisingly hard to create a bootable Windows USB using macOS. These are my steps for doing so, which have worked for me in macOS Monterey (12.6.1) for Windows 10 and 11. After following these steps, you should have a bootable Windows USB drive.

1. Download a Windows disc image (i.e. ISO file)

You can download Windows 10 or Windows 11 directly from Microsoft.

2. Identify your USB drive

After plugging the drive to your machine, identify the name of the USB device using diskutil list, which should return an output like the one below. In my case, the correct disk name is disk2.

@super-ultraman
super-ultraman / make-rir-delegated-latest.py
Created November 27, 2020 06:12 — forked from nickfox-taterli/make-rir-delegated-latest.py
make afrinic/apnic/arin/ripe/lacnic delegated-latest ipv4 and ipv6 list script
#!/usr/bin/env python
# vim:fileencoding=utf-8
""" [NAME] script or package easy description
[DESCRIPTION] script or package description
"""
from datetime import datetime
from argparse import ArgumentParser
import pprint
@arcezd
arcezd / guide.raspbian.root.lvm.md
Last active February 19, 2025 21:07
Guide to move root Raspbian to LVM partition

Prepare the installation with LVM drivers

DISCLAIMER: Copied from [https://raspberrypi.stackexchange.com/questions/85958/easy-backups-and-snapshots-of-a-running-system-with-lvm/85959]

Moving the installation isn't the problem but the LVM drivers must be loaded on boot up so the root partition can be mounted and used for booting. Fortunately the Raspberry Pi supports loading a ramdisk for initrd so we have to do an additional step to create the initram containing drivers for LVM.

The following is only for a quick setup an initramfs where you have to monitor kernel updates by yourself. To use a more automated setup an initramfs you can look at How can I use an init ramdisk (initramfs) on boot up Raspberry Pi?.

If you are unexperienced with linux please try it first with a new image how I did for this How To. You can loose all data.

For reference I use Raspbian Buster with Desktop 2020-02-13, flashed it to a SD Card and boot it in a RasPi. First do an upgrade to get the latest software versions and instal

rhcloud.com
freepornfull.com
justmysize.com
kompoz.me
allwomenstalk.com
lindamedic.com
maximonline.ru
planetromeo.com
www.net.cn
javjunkies.com
@59adc5ed-4a64-4984-bf6a-2b9117da6625
59adc5ed-4a64-4984-bf6a-2b9117da6625 / mac_restart_vnc_over_ssh.md
Last active March 14, 2025 04:08
Mac OSX - Restart VNC Server over SSH
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active May 12, 2025 11:33
set -e, -u, -o, -x pipefail explanation
@ThomasLeister
ThomasLeister / cloud-ubuntu-netplan-secondary-ip-static.md
Created May 25, 2018 08:30
Ubuntu netplan config for secondary ip address

In case there's already a DHCP config for netplan for the private IP address:

File: /etc/netplan/50-cloud-init.yaml

Contents:

# This file is generated from information provided by
# the datasource.  Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
@retspen
retspen / pf_nat
Created March 2, 2018 18:27
Enable NAT on macOS
#!/bin/bash
cat > /usr/local/etc/pf-nat.conf << EOF
nat on en0 from vnic1:network to any -> (en0)
EOF
sudo pfctl -d
sudo sysctl -w net.inet.ip.forwarding=1
sudo pfctl -f /usr/local/etc/pf-nat.conf -e