View delete-from-v2-docker-registry.md

One liner for deleting images from a v2 docker registry

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" \
View camel_case_to_snake_case.py
#!/usr/bin/env python
"""
Convert camel-case to snake-case in python.
e.g.: CamelCase -> snake_case
Relevant StackOverflow question: http://stackoverflow.com/a/1176023/293064
"""
View react-unexpected-use-of-location.md
React: Unexpected use of 'location';

Solution: Use window.location instead of bare location.

View Makefile
################################################################################
# Golang automatic Makefile #
################################################################################
##
#
# @author Jay Taylor <jay@gigawatt.io>
#
# @date 2015-05-20
#
View log4j2.properties
status = error
dest = err
name = PopertiesConfig
property.logDir = /var/log/elasticsearch
appender.console.type = Console
appender.console.name = STDOUT
appender.console.layout.type = PatternLayout
appender.console.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] %marker%m%n
View pgBackup.sh
#!/usr/bin/env bash
##
# @author Jay Taylor [@jtaylor]
#
# @date 2013-10-02
#
# Postgres database dump, compress and upload to s3.
#
# Make sure this script runs from a directory with enough space to hold and compress the db dump.
View _README.md

hn-utils favorites usage example

hackernews favorites output for user sharemywin

Package source code is available from jaytaylor.com/hn-utils.

Command

hn-utils -u sharemywin
View 0-example-pre-autopep8-formatting.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import sys
def main(args):
parser = argparse.ArgumentParser(
description='Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text.. ',
argument_default=False,
View html2text-issue-28.go
package main
import (
"fmt"
"github.com/jaytaylor/html2text"
)
func main() {
inp := ` <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-=1"><style type=3D"text/css" style=3D"display:none;"><!-- P {margin-top:0;margi=n-bottom:0;} --></style></head><body dir=3D"ltr"><div id=3D"divtagdefaultwrapper" style=3D"font-size:12pt;color:#000000;font=-family:Calibri,Helvetica,sans-serif;" dir=3D"ltr"><p style=3D"margin-top:0;margin-bottom:0"><br></p><p style=3D"margin-top:0;margin-bottom:0"><br></p><div id=3D"Signature"><div id=3D"divtagdefaultwrapper" dir=3D"ltr" style=3D"font-size:12pt; color=:rgb(0,0,0); background-color:rgb(255,255,255); font-family:Calibri,Arial,H=elvetica,sans-serif,EmojiFont,&quot;Apple Color Emoji&quot;,&quot;Segoe UI =Emoji&quot;,NotoColorEmoji,&quot;Segoe UI Symbol&quot;,&quot;Android Emoji&=quot;,EmojiSymbols,EmojiFont,&quot;Apple Color Emoji&quot;,&quot;Segoe UI E=moji&quot;,NotoColorEmoji,&quot;Segoe UI Symbol&quot;,&quot;Android Emoji&q=uot;,EmojiSy
View macos-howto-kill-pid-listening-on-port.md

Mac OS X

HOWTO: Kill PID occupying a port on macOS.

lsof -t -i tcp:<port-number> | xargs kill

Example