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
# git for fork. | |
param ( | |
[string] $RepoUrl, | |
[string] $Dest | |
) | |
function Help { | |
Write-Host 'Git command for clone repo which not belong to you.' | |
Write-Host ' -> create dir with name ' -NoNewline | |
Write-Host '$host#$user#$repo' -ForegroundColor Green |
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
/* | |
* to use this script, | |
* 1. save debug-route.js to rsshub root dir. | |
* 2. try: node debug-route.js "/chrome/webstore/extensions/SOME_ID" | |
*/ | |
const moduleAlias = require('module-alias'); | |
moduleAlias.addAlias('@', () => __dirname + '/lib'); | |
const util = require('util'); |
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
param( | |
[Parameter(Position=0, mandatory=$true)] | |
[string] $Path | |
) | |
function RenameBak { | |
param ( | |
[string] $Path | |
) |
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
param( | |
[Parameter(Position=0, mandatory=$true)] | |
[string] $Command, | |
[Parameter(Position=1, Mandatory=$false, ValueFromRemainingArguments=$true)] | |
[string[]] $CommandArgs | |
) | |
$PM_BASE_DIR = "$env:UserProfile\.pm" |
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
import time | |
import contextlib | |
import gc | |
@contextlib.contextmanager | |
def disable_gc(): | |
if gc.isenabled(): | |
gc.disable() | |
yield | |
gc.enable() |
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 open image in subview | |
// @namespace https://github.com/Cologler/ | |
// @version 0.1 | |
// @description open image in a subview without redirect. | |
// @author Cologler ([email protected]) | |
// @noframes | |
// @license MIT | |
// @grant GM_addStyle | |
// @grant GM_getResourceText |
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 -*- | |
# | |
# Copyright (c) 2017~2999 - cologler <[email protected]> | |
# ---------- | |
# format output from pipe. | |
# ---------- | |
'''Usage: | |
python pr.py PATTERN |
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 QS | |
// @namespace https://github.com/cologler/ | |
// @version 0.1.6.1 | |
// @description a helper for QuickSettings. | |
// @author cologler ([email protected]) | |
// @grant none | |
// @license MIT | |
// @require https://cdn.jsdelivr.net/quicksettings/latest/quicksettings.min.js | |
// ==/UserScript== |
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
/** | |
* Copyright (c) 2017~2999 - cologler <[email protected]> | |
* @param {any} root | |
* @param {any} options | |
* */ | |
function sortChildren(root, options) { | |
options = Object.assign({ | |
filter: () => true, | |
selector: z => z, | |
comparer: (x, y) => x - y |