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 ruby | |
require "pathname" | |
require "json" | |
require "tty-prompt" | |
require "pastel" | |
conventional = false | |
LABEL_TO_CONVENTIONAL = { | |
bug: :fix, |
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 | |
from subprocess import run | |
import json | |
def create_github_issue(iid: int, title: str, body: str, open = True): | |
# make sure the issue we will create will have the same number as the one in GitLab | |
github_last_issue = json.loads( run(["gh", "issue", "ls", "--state", "all", "--limit", "1", "--json", "number"], capture_output=True).stdout.decode('utf-8')) | |
previous_iid_from_github = github_last_issue[0]['number'] if len(github_last_issue) > 0 else 0 | |
if previous_iid_from_github != iid-1: | |
print(f"Previous issue in GitHub has number {previous_iid_from_github}, while the next one should be {iid}.") |
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
mutation DeleteContribution($user: UID!, $option: LocalID!) { | |
deleteContribution(user: $user, option: $option) { | |
...MutationErrors | |
... on MutationDeleteContributionSuccess { | |
data { | |
...List_UserContributions_Pending_remove | |
...List_UserContributions_Paid_remove | |
...List_UserContributions_Options_insert | |
id | |
} |
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
internet | |
renater | |
cluster proxmox: { | |
hyperviseurs: { | |
iota | |
sigma | |
omega | |
} |
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 ruby | |
require "uri" | |
require "net/http" | |
# dumb websites | |
# maps hosts to allowed >=400 http status codes | |
exceptions = { | |
"twitter.com": 400, | |
"www.fiverr.com": 403 |
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 ruby | |
if ["-h", "--help"].include? ARGV[0] | |
puts "Usage: #{__FILE__}" | |
puts " Include all recipes" | |
puts " #{__FILE__} including recipe1 recipe2 ..." | |
puts " Only include the specified recipes" | |
puts " #{__FILE__} excluding recipe1 recipe2 ..." | |
puts " Exclude the specified recipes" | |
exit 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
function up | |
paru | |
pnpm up -g | |
rustup update | |
gup update | |
pipx upgrade-all | |
opam upgrade | |
gh extension upgrade --all | |
cargo install-update -a | |
gem update |
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 ruby | |
require "pathname" | |
require "json" | |
require "tty-prompt" | |
require "pastel" | |
conventional = true | |
LABEL_TO_CONVENTIONAL = { | |
bug: :fix, |
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 ruby | |
# Install dependencies: | |
# - gem install tty-prompt | |
# - gem install pastel | |
# - https://cli.github.com | |
# - npm install --global gitmoji-cli; gitmoji -u | |
# (just to get the cached list of gitmojis at ~/.gitmoji/gitmojis.json, | |
# you could write out that file yourself and not install gitmoji-cli) |
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 ( | |
"strings" | |
jsoniter "github.com/json-iterator/go" | |
"unicode" | |
) | |
// Usage: put | |
// | |
// json := jsoniter.ConfigFastest | |
// setJSONNamingStrategy(lowerCaseWithUnderscore) |
NewerOlder