Skip to content

Instantly share code, notes, and snippets.

HackingGate / adb-dns.bat
Created September 19, 2023 11:48 — forked from sharunkumar/adb-dns.bat
Enabling / Disabling private DNS in android via ADB
rem to disable private dns
adb shell settings put global private_dns_mode off
rem to enable private dns with hostname (example with
adb shell settings put global private_dns_mode hostname
adb shell settings put global private_dns_specifier

Sources I receive information

A list of my sources


General news list


HackingGate /
Last active February 23, 2024 23:51
My Ubuntu Desktop Setup
# Make Ubuntu use local time (Fix Windows 10 dual boot different time issue)
timedatectl set-local-rtc 1 --adjust-system-clock
# Check current settings
# Install packages
sudo apt update
sudo apt upgrade -y
sudo apt install emacs vim curl wget git build-essential -y
HackingGate /
Created April 17, 2021 12:13
WireGuard server on Oracle Cloud Always Free Compute Instance
# The script is compatible with Canonical Ubuntu (Always Free Eligible) Minimal
sudo apt update
sudo apt install wireguard
# ifconfig to check your interfae
# for Ubuntu 20.04 Minimal 2021.03.25-0 it's ens3
# Generate keys (WIP)
HackingGate /
Created December 9, 2020 03:31
Use ffmpeg to convert multiple videos(in any path) to MP4. Output in the same filename in the current path.
for arg in $@
if [[ -f $FILEPATH ]]; then
echo "Converting $FILEPATH to mp4"
const crossConcatReducer = (acc, cur, idx) => {
const gap = idx + 1;
cur.forEach((element, i) => {
const indexToInsert = (i + 1) * gap - 1;
acc.splice(indexToInsert, 0, element);
return acc;
HackingGate /
Last active April 25, 2024 11:28
My environment temperature calculation for
from sense_hat import SenseHat
import os
def get_cpu_temp():
res = os.popen('vcgencmd measure_temp').readline()
return float(res.replace("temp=", "").replace("'C\n", ""))
HackingGate /
Last active July 2, 2019 15:08
Quickly turn on CloudFlare development mode when incident happens
# You need jq and curl installed:
# sudo apt install jq curl -y
auth_key="c2547eb745079dac9320b638f5e225cf483cc5cfdda41" # find in cloudflare account settings
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353" # get zone ID via API
# Get zone ID
// Test Webhook
// WTFPL License
import Foundation
// Postbin URL
let urlString = ""
// Sample Parameter: signature
HackingGate /
Last active May 13, 2024 12:59
Retrieve and set the last modification date of all files in a git repository. Solution for
#!/bin/sh -e
if [ "$OS" = 'Darwin' ]; then
get_touch_time() {
date -r ${unixtime} +'%Y%m%d%H%M.%S'
# default Linux