redirect to awesome-hust
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
/* | |
* | |
* string.hpp: string process utility. | |
* Recolic Keghart <root@recolic.net> | |
* MIT License | |
* | |
* Minified version: works on C++11. | |
* | |
*/ |
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 FUCK BankOfChina By USD from CNY 30 seconds wait. | |
// @namespace https://recolic.net/ | |
// @version 0.1 | |
// @description If you buy other concurrency on www.boc.cn, you have to wait 30 seconds to read a document. I fucked it. | |
// @author Recolic Keghart <root@recolic.net> | |
// @match https://ebsnew.boc.cn/boc15/welcome.html* | |
// @grant none | |
// ==/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
import tempfile, subprocess | |
def py3in2(func_text, arg): | |
# escape char in arg should be escaped twice. | |
payload = ['#/usr/bin/env python3', 'def _func(arg):'] | |
for line in func_text.split('\n'): | |
payload.append(' ' + line) | |
payload.append('with open("/dev/fd/1", "w") as f:\n f.write(_func(\''+arg+'\'))\n') | |
payload = '\n'.join(payload) |
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<sys/socket.h> | |
#include<arpa/inet.h> | |
#include<stdlib.h> | |
#include<getopt.h> | |
#include <unistd.h> | |
#include<errno.h> | |
#include <fcntl.h> |
I've used @beliys code and made a bash command.
Setup: Add this code to your ~/.bash_aliases file.
function gdrive_download () {
CONFIRM=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate "https://docs.google.com/uc?export=download&id=$1" -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')
wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$CONFIRM&id=$1" -O $2
rm -rf /tmp/cookies.txt
}
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
[[source]] | |
url = "https://pypi.org/simple" | |
verify_ssl = true | |
name = "pypi" | |
[packages] | |
crcmod = "*" | |
pyserial = "*" | |
[dev-packages] |
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 | |
# Use this script with https://recolic.net/phy and https://recolic.net/phy2 | |
# to avoid typing fucked numbers into page by hand. | |
# Fuck the chinese shits who prevent you from pasting password. | |
# E.x. Alibaba bitch | |
from pykeyboard import PyKeyboard | |
import time | |
def virtual_type_array(arrToType, noWait=False): | |
k = PyKeyboard() |
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
Port = 655 | |
Subnet = 10.143.0.127/32 | |
-----BEGIN RSA PUBLIC KEY----- | |
MIICCgKCAgEAnjwfPNIG0EfokEo+Rlk81Djhqvp/KiB/UiBQy7l+g/3SJJ8halFO | |
D8AWFP520Epfn5PseGRMIwti745AGEMWYRnt2JgrMAJvg6AQmiiefBiCoaRtH9su | |
Tpfc9JekWKGzyw7E+kbxiawqQ3z7Uq85YXzrdNKKvVzKn4iU4QNI4mymAgnqPqXn | |
2YCCyc4oz5CTi16VYbMFq6DECvYU74QlhQLNgahmPfXhRWKi9bBCe0lCu8UfvTpJ | |
CVkZzJttyK+hJU6IX0u3ilwpCrnDED5cmhOamfE0IN/kkbW7egcLsmXvPQ6MYGfD | |
0yn1apGU27qp7zgh7IF0arT5rNylIBo+c+is2quoKoVGNXBJlY0GJBSYmA/6+Tr0 |
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 | |
height=$1 | |
sleep_time=$2 | |
[[ $height == '' ]] && echo 'Usage: ./hanoi.bash <height> [sleep_time = 0.6]' && exit 1 | |
[[ $sleep_time == '' ]] && sleep_time=0.6 | |
declare -a A=( $(seq 1 $height) ) | |
declare -a B |