This file contains 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
#!/bin/sh | |
cat /dev/urandom | base64 | sed 's/[^A-Za-z0-9]//' | head -c 8 |
This file contains 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
#!/bin/bash | |
export DOCKER_GEN_VERSION="0.3.9" | |
# Generates a new /etc/hosts whenever a docker host is added with a VIRTUAL_HOST environmental variable ( see super useful project at https://github.com/jwilder ) | |
# Code here shamelessly stolen from | |
# * https://github.com/jwilder/nginx-proxy/blob/master/Dockerfile | |
# * http://unix.stackexchange.com/questions/81685/how-to-remove-multiple-newlines-at-eof |
This file contains 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
#!/bin/bash | |
# Run tests (or anything else) in Docker by doing a tagged build and then run, which should make things much faster. | |
# | |
# @author forbesmyester | |
# @license MIT | |
DOCKER_TAG=$(echo $PWD | tr '[:upper:]' '[:lower:]' | sed 's/^\///' | sed 's/\//-/g') | |
echo "" | |
echo "== USING DOCKER TAG: test-$DOCKER_TAG ==========================" |
This file contains 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
#!/bin/bash | |
curl 'localhost:9200/_cat/indices?v' | awk '{ print $3 }' | grep -v '^\.' | tr '\n' '\0' | xargs -n 1 -0 -I {} curl -X DELETE "http://localhost:9200/{}" |
This file contains 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://twitter.com/jpetazzo/status/347431091415703552 | |
docker ps -a | grep 'weeks ago' | awk '{print $1}' | xargs docker rm |
This file contains 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
#!/bin/bash | |
MAX_SIZE=1920 | |
RAWS=$(find | grep RW2 | grep -v '\.jpg\.RW2') | |
for RAW in $RAWS; do | |
LOCKFILE=$(echo "$RAW" | sed 's/\.RW2$/.jpg.RW2/') | |
OUTFILE=$(echo "$RAW" | sed 's/\.RW2$/.jpg/') | |
echo $OUTFILE | |
if [ ! -e "$OUTFILE" ]; then |
This file contains 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
package main | |
// from https://tour.golang.org/methods/25 | |
import ( | |
"golang.org/x/tour/pic"; | |
"image"; | |
"image/color" | |
) |
This file contains 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
package main | |
import ( | |
"golang.org/x/tour/tree" | |
"fmt" | |
) | |
// Walk walks the tree t sending all values | |
// from the tree to the channel ch. | |
func Walk(t *tree.Tree, ch chan int) { |
This file contains 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 php:7.2.2-apache | |
RUN apt-get update && apt-get install -y libpq-dev && docker-php-ext-install pgsql | |
COPY ./ /var/www/html |
This file contains 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
with | |
table_list as (select table_catalog, table_schema, table_name from information_schema.tables where table_schema not in ('information_schema', 'pg_catalog')), | |
permissions as ( | |
select | |
grantee, | |
table_catalog, | |
table_schema, | |
table_name, | |
is_grantable, | |
privilege_type::varchar |
OlderNewer