Skip to content

Instantly share code, notes, and snippets.

View erdii's full-sized avatar
🪤

Josh Gwosdz erdii

🪤
View GitHub Profile
@erdii
erdii / nginx_sni_upstream.conf
Last active February 13, 2019 10:42
nginx proxy request to HTTPS SNI upstream
location /api {
# enable SNI
proxy_ssl_server_name on;
# you MUST set the host header seperately for SNI to work
proxy_set_header Host my-api.example.com;
# proxy requests to upstream server
proxy_pass https://my-api.example.com;
}
@erdii
erdii / global_ssh_agent.sh
Created July 14, 2018 18:35
global ssh-agent on ubuntu 16.04 with gnome 3 and systemd
# create a user service for our ssh-agent
mkdir -p .config/systemd/user/
cat > .config/systemd/user/ssh-agent.service <<EOF
[Unit]
Description=SSH key agent
[Service]
Type=simple
Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket
ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK
@erdii
erdii / install_vcenter_vcsa.md
Last active July 11, 2024 11:39
Install vCenter Server Appliance 6.5 without hash mismatch error!

Install VCSA 6.5 without hash mismatch error!

requirements

  • esxi host
  • dns or ip for both - esx and vcenter
  • correct time settings (ntp automates this, can be enabled on the esx-host)
  • use vcsa-cli installer (the iso contains vcsa-cli for win/lin/mac os)
  • "skipManifestCheck": "true" because of reasons (the installer repeatedly failed to verify integrity hashes of the created vm)
  • "os.password" and "sso.password" HAVE to pass vmware's pw rules PLUS their dictionary! (verification will pass with a pw in their dictionary but setup will not be able to complete! - we stumbled across this by pure chance after trying for 2 whole days!)
@erdii
erdii / setup_my_dev_mac.sh
Last active May 10, 2019 07:42
initial setup for my development mac - including goodies such as: local .test-domains, nginx, password-safe, docker, vpn-client, keybase, markdown-editor, vscode and more
#!/bin/bash
set -e
SCREENSHOT_PATH="~/Pictures/Screenshots"
printf "save screenshots in $SCREENSHOT_PATH\n"
mkdir $SCREENSHOT_PATH && cd $SCREENSHOT_PATH && defaults write com.apple.screencapture location $(pwd)
printf "install homebrew!\n"
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@erdii
erdii / howToModifyOvaFile.md
Created January 11, 2018 10:02 — forked from goodjob1114/howToModifyOvaFile.md
how to modify .ova file on linux/Mac using terminal....export vm (OVF 1.0) from virtualbox, then modify some tag and hash value for import vm to ESXi

extract ova files from an archive

$ tar -xvf vmName.ova

modify ovf for some invalid tag

$ vi vmName.ovf
@erdii
erdii / install_only_redis-cli.sh
Created September 24, 2017 19:01
build and install only redis-cli
#!/bin/sh
cd $(mktemp -d) && \
wget http://download.redis.io/redis-stable.tar.gz && \
tar -xvzf redis-stable.tar.gz && \
cd redis-stable && \
make && \
sudo cp src/redis-cli /usr/local/bin
@erdii
erdii / get_caddy.sh
Last active June 8, 2017 16:13
Download and install caddy on a linux box
TARBALL=caddy.tar.gz
TARGET=/opt/caddy
echo "downloading caddy"
wget -O $TARBALL "https://caddyserver.com/download/linux/amd64?plugins=http.cors,http.expires,http.filter,http.ipfilter,http.minify,http.ratelimit"
echo "creating target directory"
sudo mkdir -p $TARGET
echo "extracting caddy"
@erdii
erdii / encrypted-backup-to-s3.md
Created May 12, 2017 19:51
A crude encrypted backup on s3

encrypted backup to s3

init encfs

  • first time mounting with
    • encfs --reverse /path/to/backup /tmp/encrypted-s3-backup
  • i choose this settings:
    • x - expert mode
    • AES encryption - 256 bit keysize
@erdii
erdii / whatsapp_phone_enumerator_floated_div.js
Created May 12, 2017 12:26
PoC WhatsApp enumeration of phonenumbers, profile pics, about texts and online statuses (floated div)
/*
PoC WhatsApp enumeration of phonenumbers, profile pics, about texts and online statuses
Floated div edition
01-05-2017
(c) 2017 - Loran Kloeze - [email protected]
This script creates a UI on top of the WhatsApp Web interface. It enumerates certain kinds
of information from a range of phonenumbers. It doesn't matter if these numbers are part
of your contact list. At the end a table is displayed containing phonenumbers, profile pics,
about texts and online statuses. The online statuses are being updated every
@erdii
erdii / sysctl.conf
Created March 1, 2017 14:07 — forked from kgriffs/sysctl.conf
Linux Web Server Kernel Tuning
# Configuration file for runtime kernel parameters.
# See sysctl.conf(5) for more information.
# See also http://www.nateware.com/linux-network-tuning-for-2013.html for
# an explanation about some of these parameters, and instructions for
# a few other tweaks outside this file.
# Protection from SYN flood attack.
net.ipv4.tcp_syncookies = 1