Skip to content

Instantly share code, notes, and snippets.

View ErnHem's full-sized avatar
🌴
Awesome place!

ErnHem

🌴
Awesome place!
View GitHub Profile
@ErnHem
ErnHem / Ubuntu_AP.md
Created May 27, 2021 20:38 — forked from ExtremeGTX/Ubuntu_AP.md
Setup Ubuntu server as Access point

Introduction

This tutorial for setting up Ubuntu Server (RPi 3B) as Wifi access point

Overview:

The main steps can be listed as following:

  1. Install required packages
  2. Setup hostapd
  3. Setup DNSmasq
  4. Configure AP IP Address
@ErnHem
ErnHem / SimpleHTTPServerWithUpload.py
Last active March 14, 2021 11:11 — forked from smidgedy/SimpleHTTPServerWithUpload.py
Simple Python Http Server with Upload
#!/usr/bin/env python3
########################################################################
#
# Simple HTTP server that supports file upload for moving data around
# between boxen on HTB. Based on a gist by bones7456, but mangled by me
# as I've tried (badly) to port it to Python 3, code golf it, and make
# It a little more robust. I was also able to strip out a lot of the
# code trivially because Python3 SimpleHTTPServer is a thing, and the
# cgi module handles multipart data nicely.
#
@ErnHem
ErnHem / .zshrc
Created February 22, 2021 19:45 — forked from dimitardanailov/.zshrc
My personal zsh and tmux configurations
# Path to your oh-my-zsh installation.
export ZSH=/Users/dimitar.danailov/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
# ZSH_THEME="robbyrussell"
ZSH_THEME="agnoster"
@ErnHem
ErnHem / gist:dd43ffaef7d68aa68f44ff02549e497d
Created February 7, 2021 05:45 — forked from cdown/gist:1163649
Bash urlencode and urldecode
urlencode() {
# urlencode <string>
old_lc_collate=$LC_COLLATE
LC_COLLATE=C
local length="${#1}"
for (( i = 0; i < length; i++ )); do
local c="${1:$i:1}"
case $c in
@ErnHem
ErnHem / ReadMe.md
Last active February 16, 2025 10:52 — forked from jb510/ReadMe.md
Auto Update Brew: OS X Launchd job and script to automatically update homebrew
  1. Place homebrewupdate.sh where ever you like, I use ~/.bin/homebrewupdate.sh
  2. Place the .plist file in ~/Library/LaunchAgents and update the path to your bash script
  3. run launchctl load ~/Library/LaunchAgents/homebrew-upgrade.plist or whatever you've named your plist file.
  4. check launchctl list | grep homebrew to see that it's running

Note: You might need to chmod +x homebrewupdate.sh

Note 2: you can run this manually to test your script ~/.bin/homebrewupdate.sh

Future: Update this to also update casks https://github.com/buo/homebrew-cask-upgrade or using brew cask list | xargs brew cask reinstall

@ErnHem
ErnHem / setup.sh
Created December 6, 2019 09:46 — forked from chris-sev/setup.sh
Mac Setup
#!/bin/bash
set -euo pipefail
# Display message 'Setting up your Mac...'
echo "Setting up your Mac..."
sudo -v
# Homebrew - Installation
echo "Installing Homebrew"
@ErnHem
ErnHem / aws.md
Created April 23, 2019 12:26 — forked from colinvh/aws.md
AWS Region Names

Alternative naming schemes for AWS regions

Purpose

The intent is to define terse, standards-supported names for AWS regions.

Schemes

@ErnHem
ErnHem / iterm2-solarized.md
Created January 17, 2019 16:26 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k