Skip to content

Instantly share code, notes, and snippets.

View harmancode's full-sized avatar
🐜
Mostly on GitLab. Dreaming on having time for indie projects.

E. Harman harmancode

🐜
Mostly on GitLab. Dreaming on having time for indie projects.
View GitHub Profile
@harmancode
harmancode / vpnonly.sh
Last active September 10, 2016 21:00 — forked from CHEF-KOCH/firewall.sh
Force Traffic Through a VPN via UFW (uncomplicated firewall)
#!/bin/bash
# Check root. So we don't need it everytime.
if [[ $EUID -ne 0 ]]; then
echo "Got root?"
exit 1
fi
# VPN's listening port:
vpnPORT=1194
# Interface (usually tun0 or tap0)
@harmancode
harmancode / gist:af6d68e5af071a672a3b99c8966303d4
Last active May 30, 2023 17:22 — forked from zetachang/gist:4111314
Instructions on adding a Acknowledgements Settings.bundle

How to add Acknowledgements to an iOS app's Settings bundle

  • To add Settings.bundle in Xcode. Command N and in Resource, choose Settings Bundle .
  • Open Root.plist in source code, paste the code below to replace it,
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
@harmancode
harmancode / Sync gh-pages + master branches
Last active May 17, 2021 03:03 — forked from mandiwise/Sync gh-pages + master branches
Keep gh-pages up to date with a master branch
// Reference: http://lea.verou.me/2011/10/easily-keep-gh-pages-in-sync-with-master/
// I have changed "master" with main, and used "switch" instead of "checkout". - @harmancode
$ git add .
$ git status // to see what changes are going to be commited
$ git commit -m 'Some descriptive commit message'
$ git push origin main
$ git switch gh-pages // go to the gh-pages branch
@harmancode
harmancode / nvmCommands.js
Created October 3, 2022 15:23 — forked from chranderson/nvmCommands.js
Useful NVM commands
// check version
node -v || node --version
// list installed versions of node (via nvm)
nvm ls
// install specific version of node
nvm install 6.9.2
// set default version of node