React: Unexpected use of 'location';
Solution: Use window.location
instead of bare location
.
React: Unexpected use of 'location';
Solution: Use window.location
instead of bare location
.
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" \
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
Credit to @jkishner for https://gist.github.com/jkishner/2fccb24640a27c2d7ac9
Also interesting: https://gist.github.com/cdown/1163649
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
"""Alexa top 1-million websites daily snapshot historical archival system.""" | |
__author__ = 'Jay Taylor [@jtaylor]' | |
import datetime, hashlib, logging, os, urllib2 | |
logging.basicConfig(format='%(asctime)s [%(levelname)s] %(message)s', level=logging.INFO) |
Quick references to common and useful python best-practices programming snippets and boilerplate.
# | |
# Multi-line search and inject new variable into helm templates. | |
# | |
# n.b. Works somewhat dynamically. | |
# | |
BEGIN { | |
insertion = "{{- include \"bots.k8s-envvars\" . | indent 8 }}" | |
expr_seq[0] = " +envFrom: *$" | |
expr_seq[1] = "^{prefix1}( )?- configMapRef: *$" |
-- 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' |
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.