This file contains hidden or 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 Github links: Open in new tab | |
// @namespace io.kuc.ben | |
// @version 1.1 | |
// @description Open all links from github in new tab. | |
// @author bkucera,powersee | |
// @match https://github.com/* | |
// ==/UserScript== | |
(function() { |
This file contains hidden or 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 | |
i=1 | |
while [ $i -le 700 ];do | |
echo "$i" | |
dd if=/dev/zero of=test$i.dd bs=1M count=1024 oflag=direct,nonblock | |
dd if=test$i.dd of=/dev/null bs=1M iflag=direct,nonblock | |
i=$((i+1)) | |
rm test*.dd | |
done |
This file contains hidden or 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 -e | |
hostname=$1 | |
device=$2 | |
file=$HOME/.dynv6.addr6 | |
[ -e $file ] && old=`cat $file` | |
if [ -z "$hostname" -o -z "$token" ]; then | |
echo "Usage: token=<your-authentication-token> [netmask=64] $0 your-name.dynv6.net [device]" | |
exit 1 | |
fi |
This file contains hidden or 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 | |
git filter-branch --env-filter ' | |
an="$GIT_AUTHOR_NAME" | |
am="$GIT_AUTHOR_EMAIL" | |
cn="$GIT_COMMITTER_NAME" | |
cm="$GIT_COMMITTER_EMAIL" | |
if [ "$GIT_COMMITTER_EMAIL" = "要修改的@邮箱地址.com" ] | |
then | |
cn="想要改成的用户名" |
This file contains hidden or 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
# coding: utf-8 | |
# 更新于2017/10/02,python3测试通过 | |
import re | |
import requests | |
# 领取 X 铜币 | |
# 每日登录奖励已领取 | |
base_headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.57 Safari/537.36 OPR/40.0.2308.15 (Edition beta)', 'Referer': 'https://www.v2ex.com/signin', 'Origin': 'https://www.v2ex.com'} |
This file contains hidden or 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 | |
#more trackers list, see https://github.com/ngosang/trackerslist | |
tracker_url='https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_all.txt' | |
path='http://192.168.123.1:6800/jsonrpc' | |
#此处更改为 Aria2 的管理地址 | |
passwd='xxxx' | |
#此处为密码 | |
tracker=$(echo -n $(curl -s -L $tracker_url | sed 'N;s/\n//g') | tr ' ' ',') |
This file contains hidden or 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
#本脚本在 Python3 下运行正常,先安装模块 googletrans 和 tqdm ,然后设置好文本目录和生成文件的放置目录即可 | |
#作用:能把文件夹里面的文本批量翻译成中文。 | |
#输入正确的文本编码很重要,我一开始用 utf-8 一直出错,折腾一番后,猜想难道是文本编码不对?于是在 vim 里面输入 :set fileencoding 知道了我要翻译的文本是 utf-16 …… | |
from googletrans import Translator | |
from tqdm import tqdm | |
import os | |
import random | |
import time | |
import re |
This file contains hidden or 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
<?php | |
/* | |
*DiscuzX系列论坛签到 | |
*在代码里填上你的用户名和密码~ | |
*By Perfare | |
*update 2014-3-23 | |
*/ | |
header("content-Type: text/html; charset=utf-8"); | |
function curl_get($url, $use = false, $save = false, $referer = null, $post_data = null){ |
This file contains hidden or 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
#! python3 | |
# -*- coding:utf-8 -*- | |
import requests | |
import re | |
import hashlib | |
import json | |
import time | |
from urllib import request | |
from urllib import parse |
This file contains hidden or 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 | |
# -*- coding: UTF-8 -*- | |
#forked from https://www.hostloc.com/forum.php?mod=viewthread&tid=452950 | |
import sys | |
from urllib import request | |
from http import cookiejar | |
from random import randint | |
account_dict = { | |
'0': {'username': 'xxxx', 'password': 'xxx'}, |
NewerOlder