Skip to content

Instantly share code, notes, and snippets.

View alexalouit's full-sized avatar

Alexandre Alouit alexalouit

View GitHub Profile
@alexalouit
alexalouit / readme.txt
Created December 27, 2023 10:16
Windows: flush virtual memory at shutdown
$ regedit
HKey_Local_Machine/System/Current Control Set/Control/Session Manager/Memory Management/ClearPageFile
value to 1
@alexalouit
alexalouit / gist:62019c74c0ff13460c1d876cfbbd362b
Last active December 30, 2023 12:59
UTM + Windows: WebDAV sharing size limit error
$ regedit
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters\FileSizeLimitInBytes
0xFFFFFFFF (4294967295)
@alexalouit
alexalouit / install.txt
Created December 13, 2023 15:48
yubikey digital signature
$ brew install yubico-piv-tool
Go to yubico manager, generate a PIV Digital Signature certificates
- RSA2048
- Self-signed certificate
- Expiration to 2029-12-31
- Management key (default)
- PIN (default 123456)
Generate a certificate
@alexalouit
alexalouit / itebooks.py
Created October 24, 2023 08:27 — forked from lyubenov/itebooks.py
Removes it-ebooks.info links from book's footers. Run python itebooks.py -f /sourcepath/books/thebook.pdf to cleanup your thebook.pdf file.
#!/usr/bin/env python3
import sys
import re
import shutil
import argparse
import binascii
pattern = b'''0a2f54797065202f416e6e6f740a2f53756274797065202f4c696e6b0a2f52656
374205b20.*?205d0a2f426f7264657220.*?\n0a2f41203c3c0a2f54797065202f416374696f6e
@alexalouit
alexalouit / pbs.txt
Created August 16, 2023 09:52
QEMU + macOS
$ brew install qemu
$ qemu-img create -f qcow2 pbs-os.qcow2 15G
$ qemu-img create -f qcow2 pbs-data.qcow2 2000G
# installation
# 2GB RAM
# -cdrom /Users/user/Downloads/proxmox-backup-server_3.0-1.iso
@alexalouit
alexalouit / readme.txt
Last active September 19, 2022 07:11
Send SMS over Android with ADB on MacOS
$ brew install --cask android-platform-tools
$ adb devices
List of devices attached
01e18783cc7f4cd8 unauthorized
# authorized computer on device
$ adb devices
01e18783cc7f4cd8 device
$ adb shell service call isms 7 i32 0 s16 "null" s16 "+33600000000" s16 "null" s16 "'Hello World!'"
@alexalouit
alexalouit / readme.txt
Created August 23, 2022 12:01
Apple M1 + macOS 10.11: Xdebug for PHP
$ cd /usr/local/etc/php
$ git clone https://github.com/xdebug/xdebug.git
$ cd xdebug
$ arch -x86_64 phpize
$ arch -x86_64 ./configure --enable-xdebug
$ arch -x86_64 sudo make
$ arch -x86_64 sudo make install
$ echo 'zend_extension = "/usr/local/lib/php/pecl/20210902/xdebug.so"' >> /usr/local/etc/php/8.1/php.ini
@alexalouit
alexalouit / client.py
Created May 23, 2022 18:25
zut.io python simple client
#!/usr/bin/env python
import requests
endpoint = 'https://zut.io/api'
username = 'JohnDoe'
password = 'YWNlZGVjZDAwNjdiNjRkNjkyYWNkZTVmYjA4MGE3OTY'
payload = { 'url': 'http://www.yahoo.co.uk/' }
response = requests.post(endpoint, json=payload, auth=(username, password))
@alexalouit
alexalouit / readme.txt
Created April 22, 2022 20:45
MacOS: move postgresql/timescaledb data directory
# move from /usr/local/var/postgres to ..
$ nano /usr/local/opt/postgres/homebrew.postgresql.service /usr/local/opt/postgres/homebrew.mxcl.postgresql.plist
@alexalouit
alexalouit / readme.txt
Created April 4, 2022 10:23
macOS: reduce ram usage
- disable SIP
# boot in recovery mode (Command + R)
# open utilities / terminal
$ csrutil disable
- disable Spotlight indexing
$ sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
- change swapper default mode
vm_pageout.h: