Skip to content

Instantly share code, notes, and snippets.

View nevikw39's full-sized avatar
🉑
🉑抹茶拿鐵 o'_'o

牜攵 nevikw39

🉑
🉑抹茶拿鐵 o'_'o
View GitHub Profile
@nevikw39
nevikw39 / konsole-ptt-paste.sh
Created April 18, 2020 06:00
以模擬方式將剪貼內容逐字輸入至 konsole 視窗,藉以獲得 p 幣。
#!/usr/bin/zsh
zmodload -i zsh/mathfunc
for pid in $(pgrep konsole); do
for window in $(xdotool search --pid $pid); do
if [[ "$(xdotool getwindowname $window)" =~ "ptt" ]]; then
xdotool type --window $window --delay $(( 666 + 1334 * rand48() )) $(xclip -o -selection clipboard);
fi
done;
done;
@nevikw39
nevikw39 / g_d005.cpp
Created January 28, 2020 09:36
GreenJudge d005: 99年台中區第五題
#include <iostream>
#include <sstream>
#include <stack>
// #pragma GCC optimize("O3")
using namespace std;
struct node
{
int n;
node *l, *r;
};
@nevikw39
nevikw39 / 寒訓名稱亂數產生器.py
Created September 28, 2019 07:59
寒訓名稱亂數產生器
#!/usr/local/bin/python3
import random
arr = ['資', '電', '漫', '遊', '網', '路', '漫', '遊', '者', '神', '經', '漫', '遊', '者', '訊', '息', '壁', '壘', '網', '域', '遊', '蕩', '漂', '流', '虛', '擬', '戰', '爭', '虛', '擬', '現', '實', '資', '安', ',', '駭', '客', ',', '網', '域', '漫', '遊', '者', '超', '頻', '駭', '客', '與', '資', '訊', '壁', '壘', '天', '才', '瘋', '子', '大', '字', '典', '家', '都', '市', '擴', '張', '電', '晶', '駭', '入', '滲', '透', '電', '元', '電', '晶', '元', '電', '容', '資', '訊', '安', '全', '駭', '客', '阻', '斷', '服', '務', '攻', '擊', 'D', 'D', 'O', 'S', '記', '憶', '儲', '存', '資', '訊', '洩', '露', '閃', '存', '盜', '夢', '空', '間', '幻', '境', '現', '實', '夢', '境', '電', '資', '幻', '夢', '訪', '生', '人', '不', '會', '夢', '見', '電', '子', '羊', '網', '域', '漫', '遊', '資', '電', '幻', '夢', 'H', 'i', 'g', 'h', ' ', 'T', 'e', 'c', 'h', ' ', 'L', 'o', 'w', ' ', 'L', 'i', 'f', 'e', '這', '個', '是', '總', '召', '想', '的', '一', '堆', '名', '稱', '碎', '片']
while True:
print(random.choice(arr) + random.choice(arr) + random.choice(arr) + random.choice(arr))
input()
810049
810150
810164
810187
810214
810215
810245
810246
810319
810337