Skip to content

Instantly share code, notes, and snippets.

View eudemonics's full-sized avatar

vvn eudemonics

View GitHub Profile
@eudemonics
eudemonics / mac-trim-support-non-apple-ssd.markdown
Created January 28, 2022 19:29 — forked from bzerangue/mac-trim-support-non-apple-ssd.markdown
Enabling TRIM Support on Mac OS X with Non-Apple SSDs

How To: Enable TRIM with Non-Apple SSD

The guide breaks the process down into three steps, all performed via copying and pasting the code snippets through the terminal window. To launch a terminal window, open the Utilities folder inside the Applications folder and select terminal.

The first step makes a backup of the original IOAHCIBlockStorage file called IOAHCIBlockStorage.original. You will be prompted to enter in your system password when using the "sudo" command, since you are modifying system files. Copy and paste the code into the terminal window, a successful or uneventful response is a new blank terminal line.

sudo cp /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage.original

Next the code patches the IOAHCIBlockStorage file, removing the requirements that the SSD be made by Apple. Copy and paste t

@eudemonics
eudemonics / vpnfw.sh
Last active October 28, 2015 08:36
script for android to send wifi tethering traffic over openVPN
#!/bin/sh
# requires ROOT privileges on android
# save this file to /data/local/vpnfw.sh on device. open new terminal on device and type:
# chmod 777 /data/local/vpnfw.sh
# connect to openVPN server first, then turn on wifi tethering
# execute script by typing:
# sh /data/local/vpnfw.sh
iptables -t filter -F FORWARD
iptables -t nat -F POSTROUTING
iptables -t filter -I FORWARD -j ACCEPT