from git-duet:
Rebasing (resets the committer to the committer of the current pair):
$ git rebase -i --exec 'git duet-commit --amend'| -- start sqlite monitor with _histdb_query | |
| -- most-often used commands; top ones at the bottom | |
| SELECT | |
| commands.argv, count(*) as invocation_count | |
| FROM | |
| history | |
| LEFT JOIN | |
| commands | |
| ON |
| steampipe query --output json " | |
| select | |
| title, url, 'https://news.ycombinator.com/item?id=' || id as comments_url | |
| from | |
| hackernews_top | |
| where | |
| time > current_date - interval '24 hour' | |
| order by | |
| score desc | |
| limit |
| $x("//a[@title='Click to re-crawl this link']").forEach(element => element.click()); |
from git-duet:
Rebasing (resets the committer to the committer of the current pair):
$ git rebase -i --exec 'git duet-commit --amend'| # Insert an event into InfluxDB | |
| use e5573; | |
| INSERT events title="Disabled unattended-upgrades",description="We should see reduced bandwidth usage from here on",tags="apt,debug,bandwidth"; | |
| # Configure the annotation in Grafana | |
| # https://grafana.com/docs/grafana/latest/features/datasources/influxdb/#annotations | |
| SELECT title, description from events WHERE $timeFilter ORDER BY time ASC; |
| #!/bin/bash | |
| set -euo pipefail | |
| IFS=$'\n\t' | |
| # This is an updated version of https://lebkowski.name/docker-volumes | |
| main() { | |
| remove-exited-containers | |
| remove-unused-images |
I work with a lot of different Concourse servers that have a variety of versions. fly rejects working with servers that are off to much. Therefore I have fly-3.14.1, fly-4.2.3 etc. on my machine.
But many set-pipeline scripts assume that a single fly command exists and that it magically is of the right version. So I need to switch; preferably per directory or per shell.
set-pipeline script does not know about the alias.| #!/usr/bin/env ruby | |
| # Prints the space and org names for a given route, filtered down to the hostname | |
| require 'json' | |
| require 'shellwords' | |
| def curl(url) | |
| while url | |
| JSON.parse(`cf curl #{Shellwords.escape(url)}`).tap do |result| |
| #!/usr/bin/env ruby | |
| require 'json' | |
| require 'shellwords' | |
| HIERARCHY = %w(/ org space app) | |
| def curl(url) | |
| while url | |
| JSON.parse(`cf curl #{Shellwords.escape(url)}`).tap do |result| |
| require 'erb' | |
| class UserTemplate | |
| def initialize(user) | |
| @user = user | |
| end | |
| def to_s | |
| # In the ERB template, we can refer to all instance variables, etc. due to | |
| # the binding being passed. |