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 bash | |
set -xeuo pipefail | |
export OLD=${OLD:-"9.6"} | |
export NEW=${NEW:-"11"} | |
export SRC_DIR=${SRC_DIR:-"$HOME/.sourcegraph"} | |
docker run \ | |
-w /tmp/upgrade \ |
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
// Version that excludes Sourcegraphers and prints a markdown list with hyperlinks. | |
// Commented out code was experimenting with printing contributors for each relevant repository but as some repositories don't have issues, it wasn't used. | |
package main | |
import ( | |
"context" | |
"fmt" | |
"log" |
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
// A page can have multiple editors that each have their own document, e.g. a PR. | |
{ | |
"uri": "git://github.com/django/django?d6eaf7c0183cd04b78f2a55e1d60bb7e59598310#django/__init__.py", | |
"languageId": "python", | |
"text": "from django.utils.version import get_versionVERSION = (2, 0, 0, 'alpha', 0)__version__ = get_version(VERSION)def setup(set_prefix=True): \"\"\" Configure the settings (this happens as a side effect of accessing the first setting), configure logging and populate the app registry. Set the thread-local urlresolvers script prefix if `set_prefix` is True. \"\"\" from django.apps import apps from django.conf import settings from django.urls import set_script_prefix from django.utils.encoding import force_text from django.utils.log import configure_logging configure_logging(settings.LOGGING_CONFIG, settings.LOGGING) if set_prefix: set_script_prefix( '/' if settings.FORCE_SCRIPT_NAME is None else force_text(settings.FORCE_SCRIPT_NAME) ) |
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
[ | |
{ | |
"region": "us-gov-west-1", | |
"amis": [ | |
{ | |
"id": "ami-7e7aea1f", | |
"type": "amzn2-ami-hvm-2.0.20180622.1-x86_64-ebs" | |
}, | |
{ | |
"id": "ami-3b48d85a", |
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 bash | |
K8S_DASHBOARD_PORT=30000 | |
k8s-dashboard-up () { | |
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml | |
until kubectl get pods --namespace=kube-system | grep kubernetes-dashboard &> /dev/null | |
do | |
sleep 1 |
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
# -n means don't do hostname lookups for ip addresses | |
# -i is the protocol we're targetting (e.g. 6 (ipv6) or UDP) | |
# -P because we don't want host names as we want to search by port numbers (e.g. 8080 has a host name of "http-alt"). | |
# If you want everything | |
lsof -n -P -iTCP | grep LISTEN | |
# Or if you want to limit it to a specfic port | |
lsof -n -P -iTCP:8080 | grep LISTEN |
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
# Simple bash function for running a throw-away Dockert container for experimentation purposes | |
rund() { docker container run --rm -it $@; } |
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 python:3-alpine3.6 | |
RUN apk update && \ | |
apk upgrade && \ | |
apk add git | |
# Install pipenv from master | |
RUN pip install pip --upgrade && \ | |
pip install pipenv |
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 bash | |
# Check required environment vars are set | |
required_vars=(DJANGO_SECRET_KEY DB_NAME DB_USER DB_PASSWORD DB_HOST DB_PORT CACHE_HOST CACHE_PORT) | |
missing_vars=() | |
for i in "${required_vars[@]}" | |
do | |
test -n "${!i+set}" || missing_vars+=("$i") | |
done |
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 bash | |
# --------------------------------------------------------------------- | |
# [Author] Ryan Blunden and Aaron Addleman | |
# Convenience script for AWS CLI authentication requriing MFA | |
# --------------------------------------------------------------------- | |
VERSION=0.1.0 | |
UPDATED=2017-11-07 | |
USAGE="Usage: . ./bin/$(basename "$0") -a <account-number> -u <username> -t <mfa-token>" |