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
#!/bin/bash | |
function log() { | |
local -r level="$1" | |
local -r message="$2" | |
echo -e "[$level] $message" | |
} | |
function _get_bump_part() { |
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
import sys | |
import json | |
import logging | |
import boto3 | |
def _get_logger(): | |
logger = logging.getLogger(__name__) | |
logger.setLevel(logging.DEBUG) | |
logger.addHandler(logging.StreamHandler(sys.stdout)) |
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
Description: > | |
This stack provisions the required resources for a per-branch strigo app. | |
The main idea here is that it creates host-header based listener rules which direct specific | |
hosts (e.g. test.app-dev.strigo.io) to a specific ALB Target Group behind which is the | |
instance containing the branch's code. | |
See http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-listenerrule.html | |
Parameters: | |
Branch: | |
Description: The name of the branch to build for |
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 | |
### | |
# The script uses CFN to provision a Target Group in the app-dev ALB, and creates | |
# an instance behind that target group, after which it attaches two host-header | |
# based rules to the HTTP/HTTPS listeners which target the newly created target group. | |
# After the stack is up, it installs the relevant Strigo app, ssc and job-worker builds | |
# on it for the relevant branch. | |
# | |
# NOTE: AWS_DEFAULT_REGION, AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY must be set prior to running this. |
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
### Keybase proof | |
I hereby claim: | |
* I am nir0s on github. | |
* I am nir0s (https://keybase.io/nir0s) on keybase. | |
* I have a public key ASDIFbCPY7rqb9caC4JnXr7JpQpzS2ALWFP23A1WAJpJSQo | |
To claim this, I am signing this object: |
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
#!/bin/bash | |
set -o errexit | |
# Author: David Underhill | |
# Script to permanently delete files/folders from your git repository. To use | |
# it, cd to your repository's root and then run the script with a list of paths | |
# you want to delete, e.g., git-delete-history path1 path2 | |
if [ $# -eq 0 ]; then | |
exit 0 |
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
#!/bin/bash | |
# add yourself to the docker group | |
# useradd -G docker USERNAME | |
# then you can enjoy this (for instance) | |
# dockr get logstash_container ip - to get the ip of the container | |
# or | |
# dockr stop last - to stop the last container you ran | |
# or | |
# dockr rmi none - to remove all <none> images |
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
def convert_string_to_json_list(string): | |
"""This will receive a string as an input, count curly braces and ignore | |
any newlines. When the curly braces stack is 0, it will append the | |
entire string it has read up until then to a list and continue. | |
:param string: the string to parse | |
:rtype: list of JSON's | |
""" | |
stack = 0 | |
json_list = [] |
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
Show hidden characters
{ | |
"caret_extra_width": 1, | |
"caret_style": "phase", | |
"color_scheme": "Packages/User/Material-Theme-OceanicNext (Flake8Lint).tmTheme", | |
"copy_with_empty_selection": false, | |
"drag_text": false, | |
"draw_minimap_border": true, | |
"enable_tab_scrolling": false, | |
"font_face": "Roboto Mono", | |
"font_options": |
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
# run from repo dir | |
grep '# TODO' -rn * --exclude-dir=docs --exclude-dir=build --exclude-dir=*.egg --exclude=TODO.md | sed 's/: \+#/: # /g;s/:#/: # /g' | sed -e 's/^/- /' | grep -v Makefile > TODO.md |
NewerOlder