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: 0.2 | |
phases: | |
pre_build: | |
commands: | |
- echo Logging in to Amazon ECR... | |
- aws --version | |
- eval $(aws ecr get-login --region $AWS_DEFAULT_REGION --no-include-email) | |
- REPOSITORY_URI=${ecr_address} | |
- GITHUB_TOKEN=${gh_token} |
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
""" | |
Slack chat-bot Lambda handler. | |
""" | |
import os | |
import logging | |
import urllib | |
# Grab the Bot OAuth token from the environment. | |
BOT_TOKEN = os.environ["BOT_TOKEN"] |
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
1) ==== Autossh using systemd ==== | |
Example from | |
https://gist.github.com/drmalex07/c0f9304deea566842490 | |
2) ============= | |
Install autossh |
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 | |
# Description: show dependency tree | |
# Author: damphat | |
if [ $# != 1 ]; then | |
echo 'Usage: apt-rdepends-tree <package>' | |
echo 'Required packages: apt-rdepends' | |
exit 1 | |
fi |
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
// recover from audacity crash | |
// usage: | |
// node audacity_rescue.js [sourcedir] [result_file.wav] [mono|stereo] | |
// the mono or stereo option is optional, the default is mono. | |
// | |
// Description: | |
// This script will sort all files on modification date. | |
// If you create a backup, make sure you use `cp -a` to preserve the modification date | |
// or create a zip. |
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 | |
#Recover from an Audacity 2.0 crash by reassembling the saved data files | |
#Based on https://gist.github.com/912222 | |
if [ $# != 2 ]; then | |
echo "ERROR: Not enough arguments" | |
echo "$0 [SOURCE PATH] [DESTINATION]" | |
exit 1 | |
fi |
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 | |
# Map Caps Lock key to Left Control key | |
# https://developer.apple.com/library/content/technotes/tn2450/_index.html | |
# This doesnt work. Reverts on restart | |
# hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000039,"HIDKeyboardModifierMappingDst":0x7000000E0}]}' | |
# References: | |
# https://github.com/mathiasbynens/dotfiles/issues/310 | |
# https://gist.github.com/scottstanfield/0f8ce63271bebfb5cf2bb91e72c71f91 | |
# The last link didnt work for me on Sierra or High Sierra. I could not find IOHIDKeyboard but |
OlderNewer