Skip to content

Instantly share code, notes, and snippets.

Command to run:
ssh -L 2222:localhost:8501 user@remoteserver.com
where 2222 is the local port mapping it can be any number above 1000
where localhost must be set to localhost and refers to your current connection
where 8501 is the port you will be opening up on the remote machine
where user@remoteserver.com is the first hop in your quest for internal access
# Install these packages (use your favorite AUR tool here)
yay -S minikube kubectl docker-machine-driver-kvm2 libvirt qemu-headless ebtables
# Get libvirt going
sudo systemctl enable libvirtd.service
sudo usermod -a -G libvirt $(whoami)
# This fix thanks to http://blog.programmableproduction.com/2018/03/08/Archlinux-Setup-Minikube-using-KVM/
sudo virsh net-autostart default
@hpio
hpio / gist:dd8604ac755625d2e428a88da01e990d
Created January 23, 2019 15:32
Git delete local branches that no longer have remote
git remote prune origin
git branch -vv | grep 'origin/.*: gone]' | awk '{print $1}' | xargs git branch -D
@hpio
hpio / alertmanager.sh
Created October 10, 2018 10:24
Script to test Alertmanager's integrations
#!/bin/bash
name=$RANDOM
url='http://127.0.0.1:9093/api/v1/alerts'
echo "firing up alert $name"
# change url o
curl -XPOST $url -d "[{
\"status\": \"firing\",
@hpio
hpio / .gitlab-ci.yml
Created September 19, 2018 15:52
Gitlab CI configuration for Packer
image:
name: hashicorp/packer:latest
entrypoint:
- '/usr/bin/env'
- 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
.packer: &packer
before_script:
- packer --version
- mkdir -p ./creds
@hpio
hpio / README.md
Created January 19, 2017 23:36 — forked from KonradIT/readme.md
GoPro Studio for Linux

####GoPro Protune correction, timelapse assembling, fisheye removal, slow motion, 4:3 to 16:9 and motion blur in Linux OS - GoPro Studio for Linux - KDEnlive, FFMPEG, ImageMagick, Mencoder and Python!

GoPro Studio has been tremendously useful for GoPro users, but not all GoPro users can enjoy the tool, there is no GoPro Studio for Linux. So some users made their ways to emulate GoPro Studio on Linux.

This guide is more than GoPro Studio, is a must read guide for Linux and GoPro users.

The main features of GoPro Studio are:

  • Convert and edit Protune footage and apply Protune effect.
  • Convert 4:3 footage to 16:9
  • Slow motion
@hpio
hpio / tcpdump-es-capture
Created January 6, 2017 16:27 — forked from z0mbix/tcpdump-es-capture
Capture Elasticsearch Queries
# tcpdump -A -nn -s 0 'tcp dst port 9200 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)' -i lo
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on lo, link-type EN10MB (Ethernet), capture size 65535 bytes
14:32:33.525122 IP 127.0.0.1.49777 > 127.0.0.1.9200: Flags [P.], seq 313752908:313753888, ack 2465010394, win 257, options [nop,nop,TS val 2684167067 ecr 2684167066], length 980
E...^.@.@............q#...}L...............
..#...#.GET /index/_search HTTP/1.1
Host: 127.0.0.1:9200
Accept: */*
Content-Length: 845
Content-Type: application/x-www-form-urlencoded
@hpio
hpio / install_sublime_text.sh
Created February 11, 2016 09:53 — forked from simonewebdesign/install_sublime_text.sh
Install Sublime Text 3 on Linux via POSIX shell script - http://simonewebdesign.it/install-sublime-text-3-on-linux/
#!/bin/sh
# Sublime Text 3 install with Package Control (last update: 9 Feb 2016)
#
# No need to download this script, just run it on your terminal:
#
# $ curl -L git.io/sublimetext | sh
#
# When you need to update Sublime Text, run this script again.
@hpio
hpio / apt-get.txt
Last active November 19, 2015 09:11
apt-get select a config file while upgrading packages
sudo apt-get -o Dpkg::Options::="--force-confold" -y upgrade
See the dpkg manual (man dpkg), specifically:
confnew: If a conffile has been modified always install
the new version without prompting, unless the
--force-confdef is also specified, in which case the
default action is preferred.
confold: If a conffile has been modified always keep the