Skip to content

Instantly share code, notes, and snippets.

@arkty
arkty / README.md
Created September 9, 2020 10:09 — forked from amkisko/README.md
Wireguard and iptables restrictions for multiple users

Wireguard and iptables restrictions for multiple users

If you don't know what Wireguard is, well, you should. It's fast, easy to setup and highly configurable. We will configure Wireguard for multiple users with various restrictions using iptables.

Assumptions

This should fit most setups (not mine though 😉)

So, you want to be able to work from anywhere. You want to be on a mountain somewhere, two bars of 3G signal, and you forward that to your laptop with a WiFi hotspot. Open your laptop and your shell on remote is already open and as responsive as possible. Work/life balance? With power like this, who cares?

Problem Scenario

Often, in academic institutions at least, you have the following situation:

@arkty
arkty / .gitlab_ci.yml
Created December 24, 2017 22:46 — forked from Qurus/.gitlab_ci.yml
Deploy from Gitlab CI to Dokku
variables:
DOKKU_HOST: 'dokku.host.es'
IP_DOKKU_HOST: '1.2.3.4'
SSH_DOKKU_PORT: '22'
PROJECT_NAME: 'project_name'
stages:
- deploy_to_dokku
deploy_dokku:
@arkty
arkty / genymotionwithplay.txt
Created October 27, 2016 07:53 — forked from wbroek/genymotionwithplay.txt
Genymotion with Google Play Services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23501681358544845 - gapps-kk-20140606-signed.zip)
Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip)
@arkty
arkty / HClust_Dendogram.R
Created June 10, 2016 18:11 — forked from jamesthomson/HClust_Dendogram.R
R HClust to d3.js Dendogram
library(rjson)
#convert output from hclust into a nested JSON file
HCtoJSON<-function(hc){
labels<-hc$labels
merge<-data.frame(hc$merge)
for (i in (1:nrow(merge))) {
@arkty
arkty / ingress-intel-notify-ui.user.js
Created February 15, 2016 17:21 — forked from arantius/ingress-intel-notify-ui.user.js
User script for the Ingress Intel dashboard / notifier
// ==UserScript==
// @name Ingress Intel: Notify UI
// @namespace https://arantius.com/misc/greasemonkey/
// @description Annotate the Ingress Intel Dashboard with links to control the Ingress Notify app.
// @match http://www.ingress.com/intel*
// @version 1
// @grant none
// ==/UserScript==
//const NOTIFY_SERVER = 'http://localhost:8080/'
@arkty
arkty / TileSticher.cs
Created February 9, 2016 18:12 — forked from praeclarum/TileSticher.cs
Downloads and stitches map tiles
using System;
using System.Net;
using System.IO;
using Gdk;
namespace TileSticher
{
class App
{
public static int Main (string[] args)
@arkty
arkty / CurlLoggingInterceptor.java
Created January 19, 2016 08:01 — forked from jgilfelt/CurlLoggingInterceptor.java
An OkHttp interceptor that logs requests as curl shell commands
/*
* Copyright (C) 2016 Jeff Gilfelt.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software