This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<div> | |
SVG: | |
<img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MCA1MCI+PHBhdGggZD0iTTIyIDM4VjUxTDMyIDMybDE5LTE5djEyQzQ0IDI2IDQzIDEwIDM4IDAgNTIgMTUgNDkgMzkgMjIgMzh6Ii8+PC9zdmc+" /> | |
</div> | |
<div> | |
PNG: | |
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR42mMAAQAABQABoIJXOQAAAABJRU5ErkJggg==" /> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Diff two arbitrary files in the file system | |
git diff --no-index <file-path-1> <file-path-2> | |
# Get the dates of stashes | |
git stash list --date=local |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# S3 versioned buckets with many objects can be difficult to delete due to | |
# (1) S3 using delete markers instead of deleting objects and | |
# (2) web console and cli operations time out when the bucket has many versioned objects. | |
# This script delete all versioned objects from a bucket, then deletes the bucket. | |
import boto3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- From https://stackoverflow.com/questions/44835028/postgresql-get-effective-permissions-for-specified-roles-on-each-object-type | |
WITH | |
databases AS ( | |
SELECT unnest('{db_name}'::text[]) AS dbname | |
), | |
roles AS ( | |
SELECT unnest('{role_id}'::text[]) AS rname | |
), | |
permissions AS ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker rm $(docker ps -aqf status=exited) # May want to also run for 'created' containers | |
docker rmi $(docker images -qf dangling=true) | |
docker volume rm $(docker volume ls -qf dangling=true) | |
# Untagged images | |
docker rmi $(docker images | grep "^<none>" | awk '{print $3}') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var cheerio = require('cheerio'); | |
var http = require('http'); | |
var fs = require('fs'); | |
var url = require('url'); | |
var pageUrl = 'http://www.washington.edu/students/crscat/cse.html'; | |
http.get(pageUrl, function(res) { | |
res.setEncoding('utf8'); | |
var data = ''; |