Skip to content

Instantly share code, notes, and snippets.

View steadystatic's full-sized avatar

Mike Wabst steadystatic

View GitHub Profile
@steadystatic
steadystatic / .gitconfig
Created December 22, 2020 16:43 — forked from jaburns/.gitconfig
Using VS as mergetool on WSL
[merge]
tool = vs
[mergetool "vs"]
cmd = /home/XXX/win_merge.sh merge $LOCAL $REMOTE $BASE $MERGED
trustExitCode = false
[mergetool]
keepBackup = false
[diff]
tool = vs
[difftool "vs"]
@steadystatic
steadystatic / install_minecraft.sh
Created July 6, 2019 21:33
Simple install script for Minecraft on Linux
#!/bin/bash
# YOU HAVE TO RUN WITH ROOT
# AND YOU NEED TO INSTALL JAVA FIRST
# You can install it on Debian/Ubuntu with: "sudo apt-get install openjdk-8-jre"
dir="/opt/minecraft"
# Script to make Install of Minecraft
makeInstall() {
@steadystatic
steadystatic / jq-insert-var.sh
Created June 28, 2019 18:24 — forked from joar/jq-insert-var.sh
Add a field to an object with JQ
# Add field
echo '{"hello": "world"}' | jq --arg foo bar '. + {foo: $foo}'
# {
# "hello": "world",
# "foo": "bar"
# }
# Override field value
echo '{"hello": "world"}' | jq --arg foo bar '. + {hello: $foo}'
{
@steadystatic
steadystatic / kubectl-shortcuts.sh
Created May 3, 2019 02:23 — forked from tamas-molnar/kubectl-shortcuts.sh
aliases and shortcuts for kubectl
alias kc='kubectl'
alias kclf='kubectl logs --tail=200 -f'
alias kcgs='kubectl get service -o wide'
alias kcgd='kubectl get deployment -o wide'
alias kcgp='kubectl get pod -o wide'
alias kcgn='kubectl get node -o wide'
alias kcdp='kubectl describe pod'
alias kcds='kubectl describe service'
alias kcdd='kubectl describe deployment'
alias kcdf='kubectl delete -f'
@steadystatic
steadystatic / arch_cheatsheet.txt
Created March 26, 2019 19:35 — forked from yufengwng/arch_cheatsheet.txt
Arch Linux Commands Cheatsheet
pacman
======
view logs: /var/log/pacman.log
update system
# pacman -Syu
list installed packages
# pacman -Q
@steadystatic
steadystatic / install-kubernetes-archlinux.md
Created March 26, 2019 01:30 — forked from StephenSorriaux/install-kubernetes-archlinux.md
Install Kubernetes on bare-metal ArchLinux host

Installing Kubernetes on ArchLinux

Packages

pacman -S curl docker ebtables ethtool wget unzip

Also cfssl is needed but available on AUR, using pacaur

pacaur -S cfssl
@steadystatic
steadystatic / nginx.conf
Created February 20, 2019 16:52 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@steadystatic
steadystatic / linux
Created October 27, 2018 13:42 — forked from jimboroberts/linux
Linux shell tips and tricks
Check if remote port is open with bash:
echo >/dev/tcp/8.8.8.8/53 && echo "open"
Suspend process:
Ctrl + z
Move process to foreground:
fg
Generate random hex number where n is number of characters:
@steadystatic
steadystatic / Google-Sheet-Form-Post.md
Created May 11, 2018 20:09 — forked from willpatera/Google-Sheet-Form-Post.md
Post to google spreadsheet from html form

Overview

This collection of files serves as a simple static demonstration of how to post to a google spreadsheet from an external html <form> following the example by Martin Hawksey

Run example

You should be able to just open index.html in your browser and test locally.

However if there are some permissions errors you can make a quick html server with python. Open terminal and cd to the directory where the gist files are located and enter python -m SimpleHTTPServer. By default this creates a local server at localhost:8000

@steadystatic
steadystatic / split_tunneling.md
Created May 1, 2018 22:46 — forked from jagtesh/split_tunneling.md
Split Tunneling tutorial - with openconnect (tested, works with Cisco AnyConnect VPN) Source: http://lists.unix-ag.uni-kl.de/pipermail/vpnc-devel/2009-February/002990.html

Table of Contents

  1. DISCLAIMER 2. Status 3. Introduction 4. Security issues 5. DNS