I hereby claim:
- I am mtbdeano on github.
- I am deano (https://keybase.io/deano) on keybase.
- I have a public key ASCJFCp-6D3jbA5KOPM0_Ff2m2r2Ct-xxex5_DJ1yDyKuwo
To claim this, I am signing this object:
| docker run -d --restart=always \ | |
| -p 0.0.0.0:2375:2375 \ | |
| -v /var/run/docker.sock:/var/run/docker.sock \ | |
| alpine/socat \ | |
| tcp-listen:2375,fork,reuseaddr unix-connect:/var/run/docker.sock |
| FROM openjdk:8-jre-alpine | |
| RUN apk update && apk add --nocache curl | |
| ENV ELASTIC_CONTAINER true | |
| RUN mkdir /usr/share/elasticsearch | |
| WORKDIR /usr/share/elasticsearch | |
| RUN curl -L -O https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/2.4.6/elasticsearch-2.4.6.tar.gz |
| // https://en.wikipedia.org/wiki/Konami_Code | |
| // up, up, down, down, left, right, left, right, b, a, esc (in the real world was "start") | |
| let konami_code = [38, 38, 40, 40, 37, 39, 37, 39, 66, 65, 27]; | |
| let pressed = []; | |
| document.addEventListener("keydown", event => { | |
| // 229 is the key code android devices send when their software keyboards are guesing key presses | |
| // https://bugs.chromium.org/p/chromium/issues/detail?id=118639 | |
| if (event.isComposing || event.keyCode === 229) { | |
| return; |
| ''' | |
| Data export from midroll's omny system for episodes and ad positions in a CSV (utf-8 encoded) | |
| (Megaphone Developer API)[https://developers.megaphone.fm/] | |
| ''' | |
| import csv | |
| import requests | |
| from collections import defaultdict | |
| import time | |
| NETWORK = "from megaphone" |
I hereby claim:
To claim this, I am signing this object:
| #!/bin/bash | |
| # get just the current folder stub/name | |
| export PROJECT=${PWD##*/} | |
| # set WHERE_TO if you have a preference, defaults to ~/node_cache/$PROJECT/node_modules | |
| export WHERE_TO=${WHERE_TO:-$HOME/node_cache/$PROJECT} | |
| echo "Moving $PROJECT node_modules to $WHERE_TO" | |
| if [[ -L ./node_modules ]]; then |
Get a list of all services on your swarm and their associated published ports:
docker service inspect \
--format="{{range .Spec.EndpointSpec.Ports}} {{$.Spec.Name}} on port {{.PublishedPort}} {{else}} {{$.Spec.Name}} exposes nothing {{end}}" \
`docker service ls|awk '{print $2;}'|tail -n +2`
| ACTIVITY_QUERY = """ | |
| SELECT Id, | |
| (SELECT Id, ActivityDate, WhatId, WhoId, Description | |
| FROM ActivityHistories) | |
| FROM Account | |
| """ | |
| ACTIVITY_FIELDS = ["Id", "AccountId", "ActivityDate", "WhatId", "WhoId", "Description"] | |
| result = sf.query(ACTIVITY_QUERY) |
| #!/usr/bin/env python | |
| import argparse | |
| import subprocess | |
| import sys | |
| # expects the output of `aws ecr get-login --region <whatevs>` piped into it, translates command line into `kubectl` | |
| if len(sys.argv) != 2: | |
| exit('usage: aws ecr get-login | {} <keyname>'.format(sys.argv[0])) | |
| secret_name = sys.argv[1] |
| from __future__ import print_function | |
| import httplib2 | |
| import os | |
| import json | |
| from apiclient import discovery | |
| import oauth2client | |
| from oauth2client import client | |
| from oauth2client import tools |