Sort .gitmodules, also easily adaptable to sort files in blocks (e.g. 4 lines at a time, or arbitrary region at a time).
See also:
#!/usr/bin/env bash
Sort .gitmodules, also easily adaptable to sort files in blocks (e.g. 4 lines at a time, or arbitrary region at a time).
See also:
#!/usr/bin/env bash
Just plug in your own values for registry and repo/image name.
registry='localhost:5000'
name='my-image'
curl -v -sSL -X DELETE "http://${registry}/v2/${name}/manifests/$(
curl -sSL -I \
-H "Accept: application/vnd.docker.distribution.manifest.v2+json" \
Author: Jay Taylor
Date: 2019-07-08
Purpose: Created as a C++ reference for SO: How do I create a URL shortener?.
React: Unexpected use of 'location';
Solution: Use window.location
instead of bare location
.
Sets system time based on what is reported by google.com. Useful for cases where it is not possible to use the standard ntpdate
command. For eample, if a Linux machine is on a network which is only able to reach the internet through an HTTP proxy.
Inspired by ryenus' answer @ https://superuser.com/a/807326/72342
# Download latest set_system_clock_from_google.sh script.
-- Found at: | |
-- http://www.if-not-true-then-false.com/2009/postgresql-psql-psqlrc-tips-and-tricks/ | |
-- http://opensourcedbms.com/dbms/psqlrc-psql-startup-file-for-postgres/ | |
\set QUIET ON | |
\pset pager always | |
\pset null 'NULL' |
I searched the net high and low but was unable to locate a definitive working example of how to take an epoch integer timestamp and insert it as a native postgres timestamp without timezone.
CREATE TABLE IF NOT EXISTS tz_test (
stamp TIMESTAMP NOT NULL
It is possible to use curl to query the LXD unix.socket directly:
curl --unix-socket /var/lib/lxd/unix.socket http:/1.0/containers | jq .
Example output:
{
Python programs to remove or modify files without changing the modification time of the parent directory.
curl -fSLO https://gist.github.com/jaytaylor/e2e0b53baf224f4e973b252370499de7/raw/bc175ba7008626ebc3f356c16f8240ebe578c5a0/rm_preserving_parent_mtime.py
curl -fSLO https://gist.github.com/jaytaylor/e2e0b53baf224f4e973b252370499de7/raw/bc175ba7008626ebc3f356c16f8240ebe578c5a0/mv_preserving_parent_mtime.py
chmod a+x rm_preserving_parent_mtime.py mv_preserving_parent_mtime.py