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 | |
# Fetch data from API and store it in a variable | |
data=$(curl --silent --globoff "https://api.nordvpn.com/v1/servers?filters[servers_technologies][identifier]=socks&limit=0" | \ | |
jq '[.[] | { | |
name: .name, | |
created_at: .created_at, | |
hostname: .hostname, | |
ip: .station, | |
load: .load, |
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
// ==UserScript== | |
// @name Prevent link mangling on Google | |
// @namespace LordBusiness.LMG | |
// @match https://www.google.com/search | |
// @grant none | |
// @version 1.1 | |
// @author radiantly | |
// @description Prevent google from mangling the link when copying or clicking the link on Firefox | |
// ==/UserScript== |
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
#include <stdio.h> | |
#include <string.h> | |
#include <stdint.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
#include <unistd.h> | |
#include <sys/io.h> | |
#include <sys/mman.h> | |
#include "elf.h" |
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
# import nothing | |
""" | |
Tested in cpython 3.6, 3.8 (from the arch repos) on 64-bit arch linux | |
""" | |
nullfunc = lambda: None | |
#from types import CodeType, FunctionType | |
CodeType = nullfunc.__code__.__class__ | |
FunctionType = nullfunc.__class__ |
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
pub fn register_panic_handler() { | |
let default_panic = std::panic::take_hook(); | |
std::panic::set_hook(Box::new(move |panic_info| { | |
default_panic(panic_info); | |
// Don't forget to enable core dumps on your shell with eg `ulimit -c unlimited` | |
let pid = std::process::id(); | |
eprintln!("dumping core for pid {}", std::process::id()); |
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 | |
set -euo pipefail | |
RELEASE="teleport-v4.2.3-linux-amd64-bin.tar.gz" | |
if [[ $EUID -ne 0 ]]; then | |
echo "--> Please run this script as root or sudo." | |
exit 1 | |
fi |
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
# enable ipv6 in dockerd conf: | |
# cat /etc/docker/daemon.json | |
{ | |
"ipv6": true, | |
"fixed-cidr-v6": "2003::/64" # your ipv6. not sure if this is even necessary | |
} | |
# reload daemon conf: | |
sudo systemctl reload docker.service |
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/sh | |
IFACE=$1 | |
ACTION=$2 | |
ntfy () { | |
sudo -u cengiz \ | |
DISPLAY=:0 \ | |
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus \ | |
notify-send "$1" "$2" |
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
#include <time.h> // Robert Nystrom | |
#include <stdio.h> // @munificentbob | |
#include <stdlib.h> // for Ginny | |
#define r return // 2008-2019 | |
#define l(a, b, c, d) for (i y=a;y\ | |
<b; y++) for (int x = c; x < d; x++) | |
typedef int i;const i H=40;const i W | |
=80;i m[40][80];i g(i x){r rand()%x; | |
}void cave(i s){i w=g(10)+5;i h=g(6) | |
+3;i t=g(W-w-2)+1;i u=g(H-h-2)+1;l(u |
NewerOlder