Skip to content

Instantly share code, notes, and snippets.

View gpolitis's full-sized avatar
👾

George Politis gpolitis

👾
View GitHub Profile
@gpolitis
gpolitis / popcorntime-vpn.sh
Created October 16, 2021 10:40 — forked from Schnouki/popcorntime-vpn.sh
OpenVPN for a single application using network namespaces -- helper scripts
#!/usr/bin/env zsh
# Initialize VPN
sudo vpnns up
sudo vpnns start_vpn
# Popcorn time!
sudo ip netns exec frootvpn sudo -u $USER popcorntime
# Cleanup
@gpolitis
gpolitis / 99-incoming-tcp-connection-gw-override.sh
Last active July 13, 2023 17:07 — forked from Shourai/Allowing SSH on a server with an active OpenVPN client.md
Allowing SSH on a server with an active OpenVPN client
#!/bin/sh
# based on https://gist.github.com/Shourai/1088f78b5e3696190a8ce6a6045c477b
if [ $# -lt 2 ]; then
echo "Usage: $0 interface up|down" 1>&2
exit 1;
fi
DEV=$1
@gpolitis
gpolitis / rules-both.iptables
Created October 5, 2015 01:36 — forked from jirutka/rules-both.iptables
Basic iptables template for ordinary servers (both IPv4 and IPv6)
###############################################################################
# The MIT License
#
# Copyright 2012-2014 Jakub Jirutka <jakub@jirutka.cz>.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
@gpolitis
gpolitis / app.rb
Created January 28, 2012 00:22 — forked from dstrelau/app.rb
Gollum protected by HTTP Basic
require 'gollum/frontend/app'
require 'digest/sha1'
class App < Precious::App
User = Struct.new(:name, :email, :password_hash)
before { authenticate! }
helpers do
def authenticate!