Skip to content

Instantly share code, notes, and snippets.

View zehome's full-sized avatar

Laurent Coustet zehome

View GitHub Profile
@alirobe
alirobe / reclaimWindows10.ps1
Last active April 23, 2024 06:15
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
###
# To print a str variable.
x/s ((PyStringObject*)str_var)->ob_sval
define ppstr
printf "%s\n", ((PyStringObject*)$arg0)->ob_sval
end
define ppr
printf "%s\n", ((PyStringObject*)PyObject_Repr($arg0))->ob_sval
end
@oskar456
oskar456 / prouting.sh
Last active June 14, 2023 22:19
A simple script to set up policy routing on linux. It's stateless and detects everything automatically, so all you have to do is to run it after every network subsystem change. I run it in postup and postdown hooks in Gentoo network configuration file.
#!/bin/bash
IP="/bin/ip"
function prepare_rt_table() {
local rttables=/etc/iproute2/rt_tables
local iface=$1
[[ "${iface}" = 'lo' ]] && return
if ! egrep -q "\s${iface}\s*"\$ $rttables; then
idx=$(wc -l <$rttables)
@tsutsui
tsutsui / expand-image-fssize-rpi.sh
Last active October 29, 2019 19:31
A dumb sh script that will expand NetBSD partition and BSD FFS partition in the RPI image prepared by Jun Ebihara: http://mail-index.netbsd.org/port-arm/2013/06/19/msg001882.html
#! /bin/sh
#
# Copyright (c) 2013 Izumi Tsutsui. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright