Skip to content

Instantly share code, notes, and snippets.

View harmancode's full-sized avatar
🐜
Mostly on GitLab

E. Harman harmancode

🐜
Mostly on GitLab
  • Texas, US
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 / gist:84c06855907975903583f79dcc67440a
Last active January 13, 2023 22:37
How to fix opendir operation not permitted error from rsync on macOS Catalina
## How to fix opendir operation not permitted error from rsync on macOS Catalina
by Ertugrul Harman (twitter.com/harmancode - github.com/harmancode)
27 Dec 2020
I was getting opendir operation not permitted error from rsync on macOS Catalina.
The command I was using: rsync -vaE --progress /Volumes/SourceName /Volumes/DestinationName
Source: https://apple.stackexchange.com/a/117469/65292
@harmancode
harmancode / gist:59358eb199fb36b7274e90eb3c19239c
Last active February 8, 2021 01:46
How to get and verify Debian Live image
## How to get and verify Debian Live image
by Ertugrul Harman
26 December 2020
Get the files from: https://cdimage.debian.org/debian-cd/current-live/amd64/bt-hybrid/
To verify debian image with GPG4Win:
gpg --keyserver pool.sks-keyservers.net --recv-keys 10460DAD76165AD81FBC0CE9988021A964E6EA7D
@harmancode
harmancode / gist:21ca44edf4b4111ded34a88472a9e940
Created February 8, 2021 01:45
How to verify and install GPG4Win
## How to verify and install GPG4Win
by Ertugrul Harman
26 December 2020
1. Download GPG4win from https://www.gpg4win.org
2. Verify its integrity by verifying its SHA checksums:
@harmancode
harmancode / gist:f1a5755aa76dc2fb2d461822ed29c5a9
Created February 13, 2021 00:20
How to solve black screen issue after logging in to KDE Plasma on Virtualbox
Give following commands:
pkcon refresh
pkcon update
@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 / gist:d385c6c69a786637299ba1e994977ff1
Created December 11, 2021 00:03
How to get Caesar III to run in windowed mode on Win 10
I've found a working solution to the problem if setting 16-bit colors isn't working out (like it wasn't for me). It is using DXWnd which is a software that wraps around other applications running them in a window. So start off with downloading that and potentially the 1920x1080 resolution exe file if you want to play in a higher resolution.
Download DXWnd: https://sourceforge.net/projects/dxwnd/
Download C3 1920x1080.exe: http://dl.dropbox.com/s/9rujui8kqlm4cql/c3%20-%201920x1080.exe
The later isn't 100% needed but I like to run it in that resolution.
Step 1a) Copy the c3 - 1920x1080.exe file to your Caesar 3 installation folder. It should be the same folder as the c3.exe file is located in.
@harmancode
harmancode / gist:d0de94cfede08b2d92c4a6ee107dd5c9
Last active June 1, 2022 22:21
How to install and use pyenv and pyenv virtualenv
How to install and use pyenv and pyenv virtualenv
by @harmancode | https://github.com/harmancode | https://harman.page
This work is licensed under a Creative Commons Attribution 4.0 International License.
pyenv
https://github.com/pyenv/pyenv
1. Install:
$ brew update
@harmancode
harmancode / gist:9ca25e90900bb71f7c023dac12035287
Created September 10, 2022 19:28
How to verify Notepad++ digital signature
Installer executable has a signature checked by Windows when it runs.
In addition to that verification, I'll explain here how to verify its
digital signature as an example of how to do gpg signature verifications.
Disclaimer: This gist is a published note for my future self.
Use it at your own risk.
1. Go to https://github.com/notepad-plus-plus/notepad-plus-plus
and note the key fingerprint: