This file contains 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 | |
bucket=$1 | |
set -e | |
echo "Removing all versions from $bucket" | |
versions=`aws s3api list-object-versions --bucket $bucket |jq '.Versions'` | |
markers=`aws s3api list-object-versions --bucket $bucket |jq '.DeleteMarkers'` |
This file contains 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 argparse | |
from mock import Mock | |
m = Mock() | |
parser = argparse.ArgumentParser() | |
subparsers = parser.add_subparsers() | |
query_group = subparsers.add_parser('query') | |
add_group = subparsers.add_parser('add') |
This file contains 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
// Package main is a sample macOS-app-bundling program to demonstrate how to | |
// automate the process described in this tutorial: | |
// | |
// https://medium.com/@mattholt/packaging-a-go-application-for-macos-f7084b00f6b5 | |
// | |
// Bundling the .app is the first thing it does, and creating the DMG is the | |
// second. Making the DMG is optional, and is only done if you provide | |
// the template DMG file, which you have to create beforehand. | |
// | |
// Example use: |
This file contains 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/sh | |
db_host=localhost | |
db_name=magento | |
db_user=root | |
db_pass=root | |
if [ ! -f ~/Downloads/magento-1.7.0.2.tar.gz ]; then | |
wget http://www.magentocommerce.com/downloads/assets/1.7.0.2/magento-1.7.0.2.tar.gz -O ~/Downloads/magento-1.7.0.2.tar.gz | |
wget http://www.magentocommerce.com/downloads/assets/1.6.1.0/magento-sample-data-1.6.1.0.tar.gz -O ~/Downloads/magento-sample-data-1.6.1.0.tar.gz |
This file contains 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
# Place following snippets into ~/.profile, ~/.bash_profile or other similar file. | |
# auto-mfa | |
complete -W "$(ls -1 ~/.aws/*.mfa | awk -F "/" '{print $NF}' | sed -e 's/\.mfa$//')" mfa mfa_token | |
function mfa_token () { | |
oathtool --base32 --totp "$(cat ~/.aws/$1.mfa)" | |
} | |
function mfa () { | |
mfa_token "$1" | pbcopy # OSX only | |
} |
This file contains 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 python | |
import os | |
import time | |
from pyA20Lime.gpio import gpio | |
from pyA20Lime.gpio import port | |
from autojenkins import Jenkins | |
### configration parameters |
This file contains 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 | |
# | |
# The MIT License (MIT) | |
# | |
# Copyright (c) 2014 Mathias Leppich <mleppich@muhqu.de> | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
This file contains 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 tags clean test build install generate image release | |
REGISTRY_REPO = <..redacted..> | |
OK_COLOR=\033[32;01m | |
NO_COLOR=\033[0m | |
ERROR_COLOR=\033[31;01m | |
WARN_COLOR=\033[33;01m | |
# Build Flags |
Creates an alias on the loopback interface (lo0) with the IP 127.0.0.2 on macOS.
- Install the plist to:
/Library/LaunchDaemons/com.runlevel1.lo0.127.0.0.2.plist
- Set mode:
sudo chmod 0644 /Library/LaunchDaemons/com.runlevel1.lo0.127.0.0.2.plist
- Set owner:
sudo chown root:wheel /Library/LaunchDaemons/com.runlevel1.lo0.127.0.0.2.plist
- Load:
sudo launchctl load /Library/LaunchDaemons/com.runlevel1.lo0.127.0.0.2.plist