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 | |
# simple jq task: reduce list of objects with by workflow_id and job id | |
# into a object { workflow_id => [list of job ids] } | |
# | |
# .o(this seriously took like 2 whole hours ot figure out) | |
gh api repos/$owner_slash_repo/actions/runs?per_page=100 \ | |
| jq '[ .workflow_runs | group_by(.workflow_id)[] | {(.[0].workflow_id|tostring): [ .[] | .id ]} ] | |
| reduce .[] as $item ({}; . * $item)' |
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
In [8]: import re | |
...: import subprocess | |
...: def get_ext_info(dev): | |
...: try: | |
...: output = subprocess.check_output(['sudo', 'dumpe2fs', '-h', dev], stderr=subprocess.DEVNULL).decode() | |
...: except: | |
...: pass | |
...: data = dict() | |
...: for line in output.splitlines(): | |
...: if m := re.match(r'^([^:]+):\s+(.+)$', line): |
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
fun Blackify() | |
let l:bsave = winsaveview() | |
let l:tname = tempname() | |
exe 'keepjumps %!black --line-length 119 -q - 2>' . l:tname | |
if v:shell_error > 0 | |
let l:lines = readfile(l:tname) | |
for l:line in l:lines | |
echo l:line | |
endfor | |
call delete(l:tname) |
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 | |
set -e | |
curl -s https://api.github.com/repos/cli/cli/releases/latest \ | |
| grep "browser_download_url.*amd64.*deb" \ | |
| cut -d : -f 2,3 \ | |
| tr -d \" \ | |
| wget -O ~/Downloads/gh-latest-linux-amd64.deb --progress=bar:force -T15 -t100 -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
# Personally I feel completely blind without my various logs. Especially | |
# `ftlog` for when I just can't figure out where I am in the tree. | |
# | |
# Every now and again, when people I'm helping with git that are feeling | |
# totally lost, I wish they had these commands. in reality, they totally do, | |
# `mylog` could probably just be `log --oneline`; but my format reveals details | |
# to help me figure out where I actually am. In particular, the commit id (%h) | |
# -- and/or reflog selector (%ar), the committer email (%ae), and the head and | |
# branch names (%d) where they occur in the tree. I suppose it helps an awful | |
# lot to know the human relatable timestamp too (%ar). |
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 No Polymer Youtube Homepage | |
// @namespace https://gist.github.com/jettero | |
// @version 0.3 | |
// @description Google keeps pusing their new shitty homepage layout with 4 recommendations. This is clearly to make advertising computation easier, but: no thanks. Until they break their classic view, that's how ima look at it. | |
// @author jettero | |
// @match https://www.youtube.com/* | |
// @downloadURL https://gist.github.com/jettero/9ffdfa504d6f1d115fe9ae0cdb1ba186/raw/no-polymer-youtube-home.user.js | |
// @grant none | |
// ==/UserScript== |
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 Factorio Wiki Force Stable | |
// @namespace org.voltar.factorio.annoyance | |
// @version 0.1 | |
// @downloadURL https://gist.github.com/jettero/8e232d72111ac8b4e3b53c13635589ce/raw/stable.factorio.wiki.user.js | |
// @description I play the stable factorio. I almost never want the unstable wiki. | |
// @author jettero | |
// @match https://wiki.factorio.com/* | |
// @grant none | |
// ==/UserScript== |
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 bash | |
FMT=$'--pretty=format:{}%x1f%C(bold yellow) %h%C(bold blue) %ae%Creset: %s %C(bold black)%ar%Creset%n' | |
git tag -l | xargs -rn1 -I{} git log -1 "$FMT" {} | while read X | |
do commit="$(cut -d $'\x1f' -f1 <<< "$X")" | |
description="$(cut -d $'\x1f' -f2 <<< "$X")" | |
# use cat-file -t to add add [c] or [t] | |
# | |
# Wait, but why?? |
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 python | |
# supports_getinfo allows us to specify all but maxinputs and filename at parse time | |
# [wget] | |
# supports_getinfo = True | |
# maxinputs = 0 | |
# filename = wget.py | |
import sys, time, json | |
from collections import OrderedDict | |
import splunk.Intersplunk as si |
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
/* intended to be used with stylus (user-css add-on) or similar | |
** no copyright intended | |
** | |
** Basically the problem is that I use a minimum font size in firefox to ensure | |
** sites can't set fonts smaller than I can read. Zooming the sites is not an | |
** acceptable option because it also jacks up the layout. minimum font size | |
** works nearly everywhere except for single edge cases like tensorboard's SVG | |
** text ... and I can't think of a single other example at the moment. | |
** | |
** update: |
NewerOlder