This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# listening port and client_id is hardcoded in wgcf_bpf_helper.c | |
# compile | |
clang -O2 -target bpf -c wgcf_bpf_helper.c -o wgcf_bpf | |
# attach ingress | |
ip link set dev eth0 xdpdrv obj wgcf_bpf sec wg-cf-xdp-ingress | |
# remove ingress | |
ip link set dev eth0 xdpdrv off | |
# enable tc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#TODO: test each square if it's actually a screen shot | |
import numpy as np | |
#from scipy.ndimage import gaussian_filter | |
from scipy.signal import convolve2d | |
from PIL import Image, ImageDraw | |
import matplotlib.pyplot as plt | |
import cv2 | |
import logging | |
log = logging.getLogger(__name__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# inspired by | |
# https://github.com/mobile-shell/mosh/issues/24#issuecomment-201893250 | |
import sys | |
import os | |
import subprocess | |
def main(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"flag" | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
"os/signal" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import ast | |
import json | |
import os | |
import subprocess | |
import argparse | |
import sys | |
FNULL = open(os.devnull, 'w') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage: | |
# Invoke this script with the current command line, one argument per word: | |
# | |
# bash get-completion.bash pacman -S x | |
# | |
# Exits with 1 if no completer has been found. | |
# | |
# To use this as the default completion in elvish, put the following in ~/.elvish/rc.elv: | |
# le:completer['']={ bash /path/to/get-completion.bash $@ } | |
# |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -s escape-time 20 | |
if-shell "test $TERMINAL = roxterm" "set -s set-clipboard off" | |
elvish='$GOPATH/bin/elvish' | |
if-shell "test -x $elvish" "set -g default-shell $elvish" | |
set -g base-index 1 | |
set -g renumber-windows on | |
set -g mouse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Bash script for setting or clearing touch requirements for | |
# cryptographic operations the OpenPGP application on a YubiKey 4. | |
# | |
# Author: Alessio Di Mauro <alessio@yubico.com> | |
GCA=$(which gpg-connect-agent) | |
DO=0 | |
UIF=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# encoding=UTF-8 | |
# Minecraft CJK-IME patchfile generator (Minecraft 中文輸入更新檔產生程式) by LPH66 @ PTT (Minecraft IGN: proghealer) | |
# | |
# Version 0.6 probably final (2015/10/22) | |
# | |
# 適用範圍:Minecraft 1.6.4 ~ 1.8.8;但 snapshot/prerelease 版本不一定適用。 | |
# | |
# 系統需求: python 3.x 執行環境。(關於 python 環境安裝等事項可至 python 官方網站查詢:https://www.python.org/ ) |
NewerOlder