Skip to content

Instantly share code, notes, and snippets.

View danieljimenez's full-sized avatar

Daniel danieljimenez

  • Texas
  • 04:00 (UTC -06:00)
View GitHub Profile
@danieljimenez
danieljimenez / Makefile
Created July 1, 2017 10:32
A Makefile for a Python AWS Lambda function
# Your favorite rapper's favorite wrapper.
.PHONY: check_defined _check_defined
check_defined = \
$(strip $(foreach 1,$1, \
$(call _check_defined,$1,$(strip $(value 2)))))
_check_defined = \
$(if $(value $1),, \
$(error Undefined argument $1$(if $2, ($2))))
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
#!/usr/bin/env bash
# Created on 2017-05-30 @ 8:18 PM
set -euo pipefail
# Script
open $(curl -Ssfl $(docker port ngrok 4040)/api/tunnels | jq -r .tunnels[1].public_url)
#!/bin/bash
aclid=acl-d347edbc
start_rule=1000
cidr=$1
if [ -z "${cidr}" ] ; then
echo "Must provide CIDR block to DENY"
exit 1
fi
#!/usr/bin/env python
from __future__ import print_function
import argparse
import logging
import sys
import xml.etree.ElementTree as ET
import boto3
#!/bin/bash -ex
killall -9 "xcodebuild" 2>/dev/null || echo "Xcode not running"
killall -9 "Simulator" 2>/dev/null || echo "Simulator not running"
rm -rf '%teamcity.agent.work.dir%/out'
rm -rf '/Users/foreflight/Library/Developer/Xcode/DerivedData'
rm -rf '/Users/foreflight/Library/Application Support/iPhone Simulator/*'
rm -rf '/Users/foreflight/Library/Developer/CoreSimulator/*'
open -a "Simulator" && /bin/sleep 15
@danieljimenez
danieljimenez / test.sh
Created February 27, 2017 02:01 — forked from anonymous/test.sh
#!/usr/bin/env bash
#
#
# 2017-02-26 7:01 PM
#
# Bash "strict mode header".
IFS=$'\n\t'
set -euo pipefail
# Path to this script.
@danieljimenez
danieljimenez / test.sh
Created February 27, 2017 02:00 — forked from anonymous/test.sh
#!/usr/bin/env bash
#
#
# 2017-02-26 7:01 PM
#
# Bash "strict mode header".
IFS=$'\n\t'
set -euo pipefail
# Path to this script.
@danieljimenez
danieljimenez / test.sh
Created February 27, 2017 02:00 — forked from anonymous/test.sh
#!/usr/bin/env bash
#
#
# 2017-02-26 7:01 PM
#
# Bash "strict mode header".
IFS=$'\n\t'
set -euo pipefail
# Path to this script.
[toplevel]
whoami = sts get-caller-identity
get-private-ip-address =
!f() {
if [ -n "${1}" ]; then
aws ec2 describe-instances --query Reservations[].Instances[].PrivateIpAddress --output text --instance-id $1
else
echo 'Pass in an instance id...' && exit 1
fi
#!/usr/bin/env bash
set -euox pipefail
SCRIPT_NAME=$(basename ${BASH_SOURCE[0]})
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
IFS=$'\n\t'
rm -rfv ~/.m2/repository/com/foreflight
rm -rfv ~/.m2/archetype-catalog.xml
cd ${SCRIPT_DIR}/bootapps/bootapp-archetype/
make