TABLE WITHOUT ID
choice(striptime(date(today)) - striptime(file.mtime) <= dur("2 days"),
"<span style=color:#859900;>●</span> ",
choice(striptime(date(today)) - striptime(file.mtime) < dur("1 week"),
"<span style=color:#b58900;>◐</span> ",
"<span style=color:#dc322f;>⊗</span> "
)
) +
Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.
Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.
The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.
Moved to Shopify/graphql-design-tutorial
| package main | |
| import ( | |
| "context" | |
| "flag" | |
| "fmt" | |
| "log" | |
| "net/http" | |
| "os" | |
| "os/signal" |
| # delete all pods | |
| kubectl delete --all pods --namespace=default | |
| # deete all deployments | |
| kubectl delete --all deployments --namespace=default | |
| # delete all services | |
| kubectl delete --all services --namespace=default |
This guide assumes that you recently run brew upgrade postgresql and discovered to your dismay that you accidentally bumped from one major version to another: say 9.3.x to 9.4.x. Yes, that is a major version bump in PG land.
First let's check something.
brew info postgresqlThe top of what gets printed as a result is the most important:
This list is based on aliases_spec.rb.
You can see also Module: RSpec::Matchers API.
| matcher | aliased to | description |
|---|---|---|
| a_truthy_value | be_truthy | a truthy value |
| a_falsey_value | be_falsey | a falsey value |
| be_falsy | be_falsey | be falsy |
| a_falsy_value | be_falsey | a falsy value |
| name=coursecal-d7 | |
| port=$(shell docker inspect -format='{{(index (index .NetworkSettings.Ports "22/tcp") 0).HostPort}}' $(name)) | |
| # launches a debug shell into the latest intermediate docker image | |
| debug_latest: | |
| docker run -t -i `docker images -q | head -n 1` /bin/bash | |
| # DESTROYS all containers (!!) and all images without a tag | |
| # NB: |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
I recently had the following problem:
- From an unattended shell script (called by Jenkins), run a command-line tool that accesses the MySQL database on another host.
- That tool doesn't know that the database is on another host, plus the MySQL port on that host is firewalled and not accessible from other machines.
We didn't want to open the MySQL port to the network, but it's possible to SSH from the Jenkins machine to the MySQL machine. So, basically you would do something like
ssh -L 3306:localhost:3306 remotehost