Skip to content

Instantly share code, notes, and snippets.

🇨🇦
Edit status

Max Gonzih Gonzih

🇨🇦
Edit status
View GitHub Profile
@Gonzih
Gonzih / main.rs
Last active Feb 26, 2020
Optional arguments in Rust
View main.rs
type Links = Vec<String>;
type Proxies = Vec<String>;
#[derive(Clone, Debug)]
struct Opts {
links: Option<Links>,
proxies: Option<Proxies>,
}
impl Opts {
@Gonzih
Gonzih / wireguard.nix
Last active Feb 1, 2020
NixOs WIREGUARD full traffic forwarding config
View wireguard.nix
{ config, pkgs, ... }:
let
secrets = import /opt/nix/secrets.nix;
externalInterface = "enp2s0";
internalInterface = "wg0";
externalPort = 51820;
externalNetMask = "10.200.200.1/24";
in
{
View keybase.md

Keybase proof

I hereby claim:

  • I am gonzih on github.
  • I am gonzih (https://keybase.io/gonzih) on keybase.
  • I have a public key ASDuSCBmos0345fAhkjGxVRvU8p40Ikp8RGA5wu5UxdTLQo

To claim this, I am signing this object:

@Gonzih
Gonzih / README.md
Last active May 11, 2018
Go workshop
View README.md
@Gonzih
Gonzih / etc-iptables-iptables.rules
Last active Apr 10, 2018
PIA/Privateinternetaccess iptables kill switch with enabled incoming SSH
View etc-iptables-iptables.rules
*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT DROP [0:10]
-A FORWARD -i tun+ -j ACCEPT
-A FORWARD -j DROP
-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -i tun+ -j ACCEPT
@Gonzih
Gonzih / PKGBUILD
Last active Mar 17, 2019
CUDNN9 aur PKGBUILD
View PKGBUILD
pkgname=cudnn9
pkgver=7
pkgrel=4
pkgdesc="NVIDIA CUDA Deep Neural Network library (version 9)"
arch=('x86_64')
url="https://developer.nvidia.com/cuDNN"
license=('proprietary')
depends=('cuda-sdk')
source=("http://files.fast.ai/files/cudnn-9.1-linux-x64-v7.tgz")
sha512sums=('7eadb64a3d5e49aec2761e6f7dc0295c1d356910b114eed450c47081fc81b6e3b7748f3a4153f6a9d957691e3689cd52823bfa12816b1950dfc8794d6f332749')
@Gonzih
Gonzih / index.js
Last active Jan 16, 2018
Slack desktop night theme
View index.js
// append to
// /usr/lib/slack/resources/app.asar.unpacked/src/static/ssb-interop.js
// based on https://github.com/laCour/slack-night-mode/
document.addEventListener('DOMContentLoaded', function() { $.ajax({ url: 'https://cdn.rawgit.com/laCour/slack-night-mode/master/css/raw/black.css', success: function(css) { $("<style></style>").appendTo('head').html(css); } }); });
@Gonzih
Gonzih / list.txt
Created Nov 4, 2017
youtube host blacklist
View list.txt
r4---sn-vgqs7nez.googlevideo.com
r4.sn-vgqs7nez.googlevideo.com
www.youtube-nocookie.com
i1.ytimg.com
r17---sn-vgqsenes.googlevideo.com
r2---sn-vgqs7n7k.googlevideo.com
clients6.google.com
r1---sn-vgqsen7z.googlevideo.com
r1.sn-vgqsen7z.googlevideo.com
r20---sn-vgqs7ne7.googlevideo.com
View gist:056c7a1acf07a7024bad6e7b50719c0c
unmap h
unmap t
map h scrollDown count=3
map t scrollUp count=3
map j removeTab
map u restoreTab
map l performFind
map L performBackwardFind
map d previousTab
map n nextTab
@Gonzih
Gonzih / main.css
Created Sep 6, 2017
Make transfer.sh more screenshot friendly
View main.css
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("transfer.sh") {
.wrapper h2.page-title, .wrapper a.btn, .wrapper h4, .wrapper br {
display: none;
}
#from-terminal {
margin-left: 0;
width: 100%;
}
You can’t perform that action at this time.