Skip to content

Instantly share code, notes, and snippets.

@jackblk
jackblk / disable-auto-update-android.md
Last active December 1, 2025 16:14
disable auto update on android, this is for samsung phone

This guide is for Windows.

  • Connect phone via USB to PC, wait a while for drivers to install.
  • Install "Minimal ADB Fastboot" (from XDA-Developers).
  • Enable USB DEBUG under "Config / Developer Options" on phone.
  • Open a Command Prompt under the folder "C:\Program Files (x86)\Minimal ADB and Fastboot"
  • Open phone adb shell: adb shell
  • Use the following commands:
@nacx
nacx / inverse-cidr.py
Created October 10, 2014 08:12
Compute the inverse list of CIDR blocks
"""Use it like this: main('192.168.1.0/24')"""
IPV4_MIN = 0
IPV4_MAX = 0xFFFFFFFF
def not_network(ipv4_address, ipv4_netmask):
assert IPV4_MIN <= ipv4_address <= IPV4_MAX
assert IPV4_MIN <= ipv4_netmask <= IPV4_MAX
def hostmask_netmask(m):