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
| aws-profiles() { | |
| cat ~/.aws/credentials | grep '\[' | grep -v '#' | tr -d '[' | tr -d ']' | |
| } | |
| set-aws-profile() { | |
| local aws_profile=$1 | |
| set -x | |
| export AWS_PROFILE=${aws_profile} | |
| set +x | |
| } |
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
| #compdef set-aws-profile | |
| _set-aws-profile() { | |
| local curcontext="$curcontext" state line | |
| typeset -A opt_args | |
| _arguments '1: :->csi' | |
| case $state in | |
| csi) |
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
| # Your init script | |
| # | |
| # Atom will evaluate this file each time a new window is opened. It is run | |
| # after packages are loaded/activated and after the previous editor state | |
| # has been restored. | |
| # | |
| # An example hack to log to the console when each text editor is saved. | |
| # | |
| # atom.workspace.observeTextEditors (editor) -> | |
| # editor.onDidSave -> |
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
| \documentclass[9pt]{beamer} | |
| \usepackage[latin1]{inputenc} | |
| \usepackage{colortbl} | |
| \usepackage[english]{babel} | |
| \newcommand{\myblue} [1] {{\color{blue}#1}} | |
| \newcommand{\newauthor}[4]{ | |
| \parbox{0.26\textwidth}{ |
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
| \documentclass[9pt]{beamer} | |
| \usepackage[latin1]{inputenc} | |
| \usepackage{colortbl} | |
| \usepackage[english]{babel} | |
| \newcommand{\myblue} [1] {{\color{blue}#1}} | |
| \newcommand{\newauthor}[4]{ | |
| \parbox{0.26\textwidth}{ |
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
| Title | |
| Speaker name | |
| [email protected] | |
| * First slide | |
| - first point | |
| - second point | |
| - third point |
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
| .PHONY: all plan apply destroy | |
| all: help | |
| # Add the following 'help' target to your Makefile | |
| # And add help text after each target name starting with '\#\#' | |
| help: ## Show this help | |
| @fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//' |
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 flatten(arr): | |
| """ | |
| Flatten a nested array | |
| >>> flatten([1, 2, 3]) | |
| [1, 2, 3] | |
| >>> flatten([1,2,3,[1,2,3]]) | |
| [1, 2, 3, 1, 2, 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
| import json | |
| import itertools | |
| from mergedict import ConfigDict | |
| # minor changes to original code at http://stackoverflow.com/questions/19378143/python-merging-two-arbitrary-data-structures | |
| def merge(a, b): | |
| if isinstance(a, dict) and isinstance(b, dict): | |
| d = dict(a) | |
| d.update({k: merge(a.get(k, None), b[k]) for k in b}) | |
| return d |
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
| { | |
| "metadata": { | |
| "name": "" | |
| }, | |
| "nbformat": 3, | |
| "nbformat_minor": 0, | |
| "worksheets": [ | |
| { | |
| "cells": [ | |
| { |