#include <stdlib.h>
#include <stdio.h>
#include <time.h>
int main() {
srand(time(NULL));
int i = 10;
while (i --) {
printf("%d\n", rand() * 100);
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
sed -i "s/jessie/stretch/g" /etc/apt/sources.list && apt update -y && apt dist-upgrade -y && printf "net.ipv4.tcp_congestion_control=bbr\nnet.core.default_qdisc=fq" >> /etc/sysctl.conf |
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
# based on the original config | |
from libqtile.config import Key, Screen, Group, Drag, Click | |
from libqtile.command import lazy | |
from libqtile import layout, bar, widget | |
from libqtile import hook | |
from libqtile.log_utils import logger | |
import os | |
import subprocess |
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
function clone::do_clone() { | |
local script="url='$1' | |
print('github' in url or 'bitbucket' in url)" | |
local need_proxy=$(python -c "$script") | |
local proxy="socks5://localhost:1080" | |
if [ "$need_proxy" = "True" ]; then | |
export {https,http,all}_proxy=$proxy | |
git clone "$1" "$2" | |
unset {https,http,all}_proxy |
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
{ | |
"log": { | |
"loglevel": "info" | |
}, | |
"outboundDetour": [ | |
{ | |
"tag": "direct", | |
"protocol": "freedom", | |
"settings": {} | |
} |
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 sys, tty, termios | |
def getch(): | |
fd = sys.stdin.fileno() | |
old_settings = termios.tcgetattr(fd) | |
try: | |
tty.setraw(sys.stdin.fileno()) | |
ch = sys.stdin.read(1) | |
if ch == '\x1b': | |
ch += sys.stdin.read(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
import requests | |
import json | |
import time | |
import datetime | |
class MobCent(): | |
def __init__(self): |
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
sudo apt install build-essential libncurses5-dev libreadline-dev zlib1g-dev liblzo2-dev libssl-dev -y | |
wget https://www.tinc-vpn.org/packages/tinc-1.1pre14.tar.gz && tar xvf tinc-1.1pre14.tar.gz && cd tinc-1.1pre14 | |
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --sbindir=/usr/sbin --with-systemd=/etc/systemd/system | |
make | |
make install | |
sudo tinc -n panda init | |
sudo tinc -n panda edit tinc-up | |
sudo tinc -n panda add subnet 192.168.25.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
#!/bin/env python | |
import os | |
import sys | |
from urllib.parse import urlsplit | |
import subprocess | |
os.chdir(os.path.expanduser("~/repo/")) | |
def clone(url, folder): | |
os.makedirs(folder, exist_ok=True) |
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
version: 0.1 | |
log: | |
level: debug | |
fields: | |
service: registry | |
storage: | |
cache: | |
layerinfo: inmemory | |
filesystem: | |
rootdirectory: /var/lib/registry |