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 Copy Link for GitHub Issues and PRs | |
// @namespace http://tampermonkey.net/ | |
// @version 0.2 | |
// @description Add a "Copy link" button to Github issue and pull requests | |
// @author ye11ow, K8sCat <k8scat@gmail.com> | |
// @match https://github.com/* | |
// @include https://github.com/*/issues/* | |
// @include https://github.com/*/pull/* | |
// @icon https://www.google.com/s2/favicons?domain=github.com |
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
urlencode() { | |
# urlencode <string> | |
old_lc_collate=$LC_COLLATE | |
LC_COLLATE=C | |
local length="${#1}" | |
for (( i = 0; i < length; i++ )); do | |
local c="${1:$i:1}" | |
case $c in |
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
import random | |
import string | |
import time | |
from selenium import webdriver | |
from selenium.webdriver.chrome.webdriver import WebDriver | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.remote.webelement import WebElement | |
LOGIN_PASSWORD = '' |
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
### Keybase proof | |
I hereby claim: | |
* I am k8scat on github. | |
* I am k8scat (https://keybase.io/k8scat) on keybase. | |
* I have a public key whose fingerprint is 9136 F38B 2DC8 7ABB 204B D0D6 CFB6 A936 4A3D 8FF5 | |
To claim this, I am signing this object: |
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
import requests | |
import json | |
import logging | |
class GitLab: | |
token = '' | |
auth_headers = None | |
base_api = 'https://gitlab.com/api/v4' | |
client = None |
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
# centos: cd /usr/share/git-core/templates/ | |
# https://stackoverflow.com/questions/2293498/applying-a-git-post-commit-hook-to-all-current-and-future-repos | |
git config --global init.templatedir '~/.git_template' |
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
# Delete local tags | |
git tag -l | xargs git tag -d && git fetch origin | |
# Prune local branches | |
git fetch origin --prune -q | |
# Prune local branches/tags | |
git fetch origin --prune --prune-tags -q |
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
Other 67 hrs 4 mins █████████████████▍░░░ 83.2% | |
Go 6 hrs 4 mins █▌░░░░░░░░░░░░░░░░░░░ 7.5% | |
Markdown 2 hrs 14 mins ▌░░░░░░░░░░░░░░░░░░░░ 2.8% | |
sh 1 hr 37 mins ▍░░░░░░░░░░░░░░░░░░░░ 2.0% | |
JavaScript 43 mins ▏░░░░░░░░░░░░░░░░░░░░ 0.9% |
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 | |
# | |
# Install git from source code on CentOS 7, refer to https://github.com/git/git/blob/master/INSTALL | |
set -e | |
# Get version from https://github.com/git/git/releases, for example: 2.29.2 | |
version=$1 | |
if [[ -z "${version}" ]]; then | |
echo "usage: $0 <version, 2.29.2> [profile]" | |
exit 1 |