Skip to content

Instantly share code, notes, and snippets.

@kconner
kconner / macOS Internals.md
Last active April 22, 2024 21:28
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@sebsto
sebsto / gist:6af5bf3acaf25c00dd938c3bbe722cc1
Last active February 27, 2024 14:01
Start VNCServer on Mac1 EC2 Instance
# YouTube (english) : https://www.youtube.com/watch?v=FtU2_bBfSgM
# YouTube (french) : https://www.youtube.com/watch?v=VjnaVBnERDU
#
# On your laptop, connect to the Mac instance with SSH (similar to Linux instances)
#
ssh -i <your private key.pem> ec2-user@<your public ip address>
#
# On the Mac
@topjor
topjor / wg.sh
Created February 7, 2019 20:44
Wireguard firmware sustain script
#!/bin/bash -e
BOARD=e300
if [ ! $(dpkg-query --show wireguard) ]; then
tag=$(curl "https://api.github.com/repos/Lochnair/vyatta-wireguard/releases" | jq -r '.[0].tag_name')
deb_url="https://github.com/Lochnair/vyatta-wireguard/releases/download/$tag/wireguard-$BOARD-$tag-1.deb"
curl -L -o "/tmp/wireguard-$BOARD-$tag.deb" "$deb_url"
dpkg -i "/tmp/wireguard-$BOARD-$tag.deb"
rm "/tmp/wireguard-$BOARD-$tag.deb"
source /opt/vyatta/etc/functions/script-template
configure
@mjquinn21
mjquinn21 / Pause Media on AirPods Disconnect.rtf
Last active April 18, 2021 16:17
Applescript to pause media from YouTube and Spotify. Works with Google Chrome for YouTube and Chrome and the desktop client for Spotify. Useful to run with Tooth Fairy to pause music when AirPods are disconnected.
How to Use This Script
1. Open Finder
2. Hit ⌘⇧L (Command + Shift + L)
3. Locate the Scripts folder
4. Move Stop_Media_When_AirPods_Disconnect_For_Tooth_Fairy.scpt to ~/Library/Scripts/
5. Open Tooth Fairy preferences
6. Select your AirPods and click “Advanced”
7. Make sure that “Run shell script after disconnecting” is ticked
8. Paste this in there:
@josephsieh
josephsieh / CGImage Rotation.png
Last active January 26, 2024 16:12
Rotate CGImage 90 degree clock wise
CGImage Rotation.png
@alirobe
alirobe / reclaimWindows10.ps1
Last active April 26, 2024 17:59
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
###
###
@fahied
fahied / apns
Created March 20, 2016 07:52
How to create APNS Certificates and merge into one PEM
Step 1: Create Certificate .pem from Certificate .p12
Command: openssl pkcs12 -clcerts -nokeys -out apns-dev-cert.pem -in apns-dev-cert.p12
Step 2: Create Key .pem from Key .p12
Command : openssl pkcs12 -nocerts -out apns-dev-key.pem -in apns-dev-key.p12
Step 3: Optional (If you want to remove pass phrase asked in second step)
Command : openssl rsa -in apns-dev-key.pem -out apns-dev-key-noenc.pem
Step 4: Now we have to merge the Key .pem and Certificate .pem to get Development .pem needed for Push Notifications in Development Phase of App
@iMerica
iMerica / viscosity-to-ios-connect.rb
Last active July 5, 2023 21:27 — forked from chrisboulton/viscosity-to-ios-connect.rb
Quickly convert all of your Viscosity connections into OVPN configuration files for OpenVPN for iOS (bundles certificates and keys in the files too)
Dir.glob("#{ENV['HOME']}/Library/Application Support/Viscosity/OpenVPN/*/config.conf").each do |file|
certificate_files = ['ca', 'cert', 'key', 'tls-auth']
config_dir = File.dirname(file)
connection_name = nil
new_config = []
File.read(file).lines.each do |line|
line.strip!
if line.start_with?('#viscosity name')
@mskutta
mskutta / EdgeRouter_IPv6_Commands_for_Comcast.txt
Last active December 6, 2023 02:11
EdgeRouter IPv6 Commands for Comcast
configure
# Configure Firewall
set firewall ipv6-name IPV6WAN_IN description 'IPV6WAN to internal'
set firewall ipv6-name IPV6WAN_IN default-action drop
set firewall ipv6-name IPV6WAN_IN rule 10 action accept
set firewall ipv6-name IPV6WAN_IN rule 10 state established enable
set firewall ipv6-name IPV6WAN_IN rule 10 state related enable
set firewall ipv6-name IPV6WAN_IN rule 10 log disable
@filipbec
filipbec / gist:5998034874b119fab0e4
Created September 5, 2014 12:31
Scannr - Keys for obtaining US Driver's license data