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 彩云小译 | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description 彩云小译自制脚本 | |
// @author github@weaming | |
// @include * | |
// @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
#!/usr/bin/env python3 | |
# For M1: | |
#!/usr/bin/arch -x86_64 /Library/Frameworks/Python.framework/Versions/3.10/bin/python3 | |
""" | |
Batch convert DNG to TIFF. | |
Install dependencies: | |
python3 -m pip install numpy cython imageio |
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 | |
# coding: utf-8 | |
""" | |
Author : weaming | |
Created Time : 2018-05-26 21:32:59 | |
Prerequisite: | |
python3 -m pip install cson arrow | |
""" | |
import json | |
import os |
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 Shotcuts | |
// @namespace http://bitflow.org | |
// @version 0.1 | |
// @description add shotcuts | |
// @match https://*/* | |
// @copyright 2022+, You | |
// ==/UserScript== | |
function onKey(e) { | |
// console.log(e, e.key); |
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
--- | |
# --------------------------------------------------- | |
# 语法 https://github.com/Dreamacro/clash/wiki/configuration | |
# 配置文件需要放置在 $HOME/.config/clash/config.yml | |
# 如果您不知道如何操作,请参阅 https://github.com/Hackl0us/SS-Rule-Snippet/wiki/clash(X) | |
# 由于 ClashCore 1.0 的发布,ClashX 1.30.x 的版本包括不向前兼容的更新。如果您的配置文件尚未兼容新的配置文件格式,请谨慎更新。 | |
# 查看详细内容:https://github.com/Dreamacro/clash/wiki/breaking-changes-in-1.0.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
package main | |
import ( | |
"fmt" | |
) | |
func one(n int64) { | |
ids := []int64{} | |
for i := int64(1); i <= n; i++ { | |
ids = append(ids, i) |
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/local/bin/python | |
import json | |
import datetime | |
from urllib.request import urlopen | |
INSTANCES = [ | |
{ | |
# Your private key for accessing gitlab: User -> Settings -> Access tokens -> add personal access token with api scope |
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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"strings" | |
) | |
const DASH = "-" |
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
# Preconditions: | |
# 1. Install adb drivers on your computer | |
# 2. Append the path of 'adb.exe' to the PATH environment variable | |
# 3. run "adb devices" to run adb ademon in background and list all connected devices | |
# 4. run "adb shell" get in the shell interface | |
cd /sdcard | |
# list all directories in current path, whose size is less than 100 KB | |
#du -d 1 | grep -v '\./\.' | awk '$1 < 100 {print $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
pragma solidity ^0.4.24; | |
contract BasicToken { | |
uint256 totalSupply_; | |
mapping(address => uint256) balances; | |
constructor(uint256 _initialSupply) public { | |
totalSupply_ = _initialSupply; | |
balances[msg.sender] = _initialSupply; |
NewerOlder