Skip to content

Instantly share code, notes, and snippets.

View ewen-lbh's full-sized avatar

Ewen Le Bihan ewen-lbh

View GitHub Profile
#!/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
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
#!/usr/bin/env ruby
require "pathname"
require "json"
require "tty-prompt"
require "pastel"
conventional = true
LABEL_TO_CONVENTIONAL = {
bug: :fix,
@ewen-lbh
ewen-lbh / remove_deployments_tab.py
Last active September 14, 2023 01:48
Remove the "Deployments" tab from github.com
"""
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
Artist Title
$stdout Over Engineering
1f1n1ty, BilliumMoto Stele, Prophecized
20syl Inertia
20syl Kodama
20syl, Oddisee Ongoing Thing
20syl, Rita J Voices
20syl Swimming Stone
2smokeyy Corn
2XM Inperspect
@ewen-lbh
ewen-lbh / close-issue.rb
Last active April 30, 2022 20:50
A small ruby executable that commits staged changes, computing the commit message so that it closes the issue and follows the Gitmoji convention. Execute it inside of a github repo, or pass owner/repo as an argument to specify a repo explicitly.
#!/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)
#!/usr/bin/env python3
# TODO overall completion % instead of single-countdown.
"""
Usage:
pomodoro [SESSIONS] [CYCLES] [WORK] [BREAK] [PAUSE]
pomodoro --total-cycles=TOTAL_CYCLES --sessions-of=CYCLES
Arguments:
SESSIONS Number of sessions (cycles then pause) [default: 9999]
CYCLES Number of cycles (work then break) per session: [default: 4]
import (
"strings"
jsoniter "github.com/json-iterator/go"
"unicode"
)
// Usage: put
//
// json := jsoniter.ConfigFastest
// setJSONNamingStrategy(lowerCaseWithUnderscore)
@ewen-lbh
ewen-lbh / pkg.go.dev.user.css
Last active May 23, 2021 09:48
pkg.go.dev dark color theme user css
@media (prefers-color-scheme: dark) {
:root {
--gray-10: #202224;
--gray-9: #3e4042;
--gray-8: #555759;
--gray-7: #6e7072;
--gray-6: #848688;
--gray-5: #aaacae;
--gray-4: #c6c8ca;
--gray-3: #dcdee0;