Skip to content

Instantly share code, notes, and snippets.

View AntouanK's full-sized avatar

Antonios Karamitros AntouanK

View GitHub Profile
```
~
❯ yay proton-vpn
9 aur/python-proton-vpn-killswitch-network-manager 0.4.3-2 (+3 0.40) (Installed)
The proton-vpn-killswitch-network-manager component is the implementation of the proton-vpn-killswitch interface using Network Manager.
8 aur/python-proton-vpn-network-manager-openvpn 0.0.7-2 (+3 0.40)
The proton-vpn-network-manager-openvpn component adds support for the OpenVPN protocol using NetworkManager.
7 aur/python-proton-vpn-network-manager 0.4.2-2 (+3 0.40)
The proton-vpn-network-manager component provides the necessary functionality for other components to interact with NetworkManager.
6 aur/python-proton-vpn-connection 0.14.4-2 (+3 0.40)
@AntouanK
AntouanK / favicons.js
Created April 20, 2022 12:18 — forked from frabert/COPYING
Favicons for HN
// ==UserScript==
// @name Favicons for HN
// @version 1
// @grant none
// ==/UserScript==
for(let link of document.querySelectorAll('.titlelink')) {
const domain = new URL(link.href).hostname
const imageUrl = `https://icons.duckduckgo.com/ip3/${domain}.ico`
const image = document.createElement('img')
import { serve } from "https://deno.land/std/http/server.ts";
const s = serve({ port: 8000 });
console.log("http://localhost:8000/");
for await (const req of s) {
req.respond({ body: "Hello World\n" });
}
@AntouanK
AntouanK / nginx.conf
Created May 13, 2020 15:43 — 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
@AntouanK
AntouanK / command
Created May 6, 2020 08:06
command to add scrollback to tmux by making a tmux.conf on the fly
cat <<_EOF_ > "/${HOME}/.tmux.conf"
new-session
set -g history-limit 30000
set -g mouse on
_EOF_
@AntouanK
AntouanK / update.cert.sh
Last active May 5, 2020 13:21
letsencrypt certificates script
#!/bin/bash
PARAMS=""
DOMAIN=foo.com
PORTS_80_443_CONTAINER=my-nginx-container
# get parameters
while (( "$#" )); do
case "$1" in
@AntouanK
AntouanK / update.cert.sh
Created April 24, 2020 08:35
generic certbot script to update letsencrypt certificates
#!/bin/bash
COMPOSE_DIR='/home/user/foo'
COMPOSE_FILE="$COMPOSE_DIR/docker-compose.yml"
DOMAIN=foo.bar.com
docker pull certbot/certbot ;
docker-compose -f $COMPOSE_FILE down;
@AntouanK
AntouanK / sketch-never-ending.md
Created February 21, 2020 11:56 — forked from Bhavdip/sketch-never-ending.md
Modify Sketch to never ending trial

###Sketch trial non stop

Open hosts files:

$ open /private/etc/hosts

Edit the file adding:

127.0.0.1 backend.bohemiancoding.com

127.0.0.1 bohemiancoding.sketch.analytics.s3-website-us-east-1.amazonaws.com

@AntouanK
AntouanK / web-servers.md
Created January 18, 2020 14:05 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@AntouanK
AntouanK / gist:6b1077486b341cbdc5955d308471418d
Created November 19, 2019 08:22
dump a postgres db with pg_dump
docker run --rm -ti -v /tmp:/tmp postgres:alpine pg_dump -U postgres -h 123.45.67.89 -p 15432 -f /tmp/dump.sql -F t