Standard escape codes are prefixed with Escape:
- Ctrl-Key:
^[ - Octal:
\033 - Unicode:
\u001b - Hexadecimal:
\x1B - Decimal:
27
| #!/bin/bash | |
| ### | |
| ### my-script — does one thing well | |
| ### | |
| ### Usage: | |
| ### my-script <input> <output> | |
| ### | |
| ### Options: | |
| ### <input> Input file to read. | |
| ### <output> Output file to write. Use '-' for stdout. |
| #!/bin/bash | |
| # Purpose: Bulk-delete GitLab pipelines older than a given date | |
| # Author: github.com/chrishoerl | |
| # GitLab API: v4 | |
| # Requirements: jq must be instaled ($ sudo apt install jq) | |
| # API example: https://gitlab.example.com/api/v4/projects | |
| # API example: https://gitlab.example.com/api/v4/projects/<projectid>/pipelines | |
| # | |
| # NOTE: Script is just a dryrun. To really delete pipelines, simply uncomment line 49 to activate | |
| # |
| global | |
| lua-load haproxy.lua | |
| frontend X | |
| tcp-request session set-var(sess.ssl_session_id) ssl_fc_session_id,hex if { ssl_fc } | |
| tcp-request content lua.ssl-log-key if { ssl_fc } |
| #!/bin/bash | |
| # This is my production backup script. | |
| # https://sqlgossip.com | |
| set -e | |
| set -u | |
| usage() { | |
| echo "usage: $(basename $0) [option]" | |
| echo "option=full: Perform Full Backup" |
| -- This service checks all the servers in the named backend (see the | |
| -- backend_name var). If _any_ of them are up, it returns 200 OK. If | |
| -- they are all down it returns a 500 FAILED. | |
| -- | |
| -- This is intended to be used as a HTTP health check from an upstream | |
| -- load balancer, without this check the most intelligent health check | |
| -- that could be performed is a simple TCP check on the HAProxy frontend. | |
| -- This would not fail in the event that HAProxy cannot see *any* of its | |
| -- downstream servers |
On your gitlab server run gitlab-rails console production
Find your user via user = User.find_by(email: "[email protected]")
Optionally change the user's email with user.email = "[email protected]"
Then run user.save!
Get the user's token with user.confirmation_token
https://PutYourGitlabHere/users/confirmation?confirmation_token=PutYourTokenHere
Install openssl with brew install openssl
Per https://solitum.net/openssl-os-x-el-capitan-and-brew/:
$ cd /usr/local/include
$ ln -s ../opt/openssl/include/openssl .
$ cd /usr/local/lib
$ $ for i in ../opt/openssl/lib/lib*; do ln -vs $i .; done
| $ ls /opt/sonatype/sonatype-work/nexus3/db/ | |
| OSystem accesslog analytics audit component config model.properties security | |
| $ docker-compose exec nexus java -jar ./lib/support/nexus-orient-console.jar | |
| CONNECT PLOCAL:/opt/sonatype/sonatype-work/nexus3/db/component admin admin | |
| REBUILD INDEX * | |
| REPAIR DATABASE --fix-graph | |
| REPAIR DATABASE --fix-links | |
| REPAIR DATABASE --fix-ridbags |
Short link to this page: caseywatts.com/quicktime
Other gists & tricks: http://caseywatts.com/gists-and-tricks
Unrelated update: my book is out! Debugging Your Brain is an applied psychology / self-help book
Scenario: You want to talk with someone over google hangouts (like for a user study), and you want to record BOTH: