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
#!/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
pragma solidity ^0.4.24; | |
contract BasicToken { | |
uint256 totalSupply_; | |
mapping(address => uint256) balances; | |
constructor(uint256 _initialSupply) public { | |
totalSupply_ = _initialSupply; | |
balances[msg.sender] = _initialSupply; |
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 ( | |
"io/ioutil" | |
"log" | |
"net/http" | |
) | |
func index(w http.ResponseWriter, r *http.Request) { | |
w.WriteHeader(http.StatusOK) |
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 | |
# macos: brew install https://raw.githubusercontent.com/kadwanev/bigboybrew/master/Library/Formula/sshpass.rb | |
user=$1 | |
ip_or_tail=$2 | |
if echo $ip_or_tail | grep -E '\.' >/dev/null; then | |
user_host=$user@$ip_or_tail | |
else | |
user_host=$user@192.168.1.$ip_or_tail |
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 | |
# Author : weaming | |
# Mail : garden.yuen@gmail.com | |
# Created : 2021-07-12 15:07:12 | |
# 解决以下几个方面的问题:色彩空间、文件压缩、EXIF 处理、水印 | |
import argparse | |
import io | |
import os | |
from PIL import Image |
NewerOlder