This file is a log of everything I've encountered when trying to migrate a Node.js, Elastic Beanstalk application from the Amazon Linux platform to the Amazon Liunx 2 platform. Here's why you should migrate:
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
var request = require('request'); | |
module.exports = function (context, done) { | |
var recBody = context.body; | |
var rContext = recBody.context; | |
var rCondition = rContext.condition; | |
var icon = recBody.status === 'Activated' ? ':open_mouth:': ':party_parrot:'; | |
var outText = `${rContext.resourceName} - ${rContext.name} - ${recBody.status} <${rContext.portalLink}|Click Here> | |
Condition: ${rCondition.metricName} ${rCondition.operator} ${rCondition.threshold} (${rCondition.metricUnit}) in the last ${rCondition.windowSize} minutes |
A good commit message helps both you and your collaborators better understand your code. A series of good messages will create a well-documented history as your code evolves. This also makes it easier for someone to pick up where you left off.
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
.factory('ForgotUsername', function($resource, API_BASE) { | |
return $resource(API_BASE + 'forgetUserID', {}, { | |
get: { | |
method: 'GET', | |
transformResponse: function(data, headers) { | |
return { Result: data === true }; | |
} | |
} | |
}); | |
}) |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
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 ruby | |
# encoding: utf-8 | |
# | |
# Usage: ruby breakdown_repos.rb > repos.csv | |
# | |
require 'github_api' | |
BASIC_AUTH = 'username:personalaccesstoken' | |
ORG = 'myOrg' |
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 bash | |
# | |
# Purpose: | |
# Maintains 7 daily and 1 weekly database backups on a remote server. | |
# | |
# Configuration: | |
# Subdirectories must be created on the remote server for each database. | |
# (This includes status & fullschema directories if applicable.) | |
# | |
# Examples: |
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
# install java | |
apt-get install -y software-properties-common | |
apt-add-repository -y ppa:webupd8team/java | |
apt-get update | |
apt-get install -y oracle-java8-installer | |
# download latest android sdk | |
# http://developer.android.com/sdk/index.html#Other | |
cd /opt | |
wget http://dl.google.com/android/android-sdk_r24.4.1-linux.tgz |
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
# ALL THESE REQUIRE THE WHOLE STRING TO BE A NUMBER | |
#### NUMBERS AND DECIMALS ONLY #### | |
# No commas allowed | |
# Pass: (1000.0), (001), (.001) | |
# Fail: (1,000.0) | |
^\d*\.?\d+$ | |
# No commas allowed | |
# Can't start with "." |
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
# install openjdk | |
sudo apt-get install openjdk-7-jdk | |
# download android sdk | |
wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz | |
tar -xvf android-sdk_r24.2-linux.tgz | |
cd android-sdk-linux/tools | |
# install all sdk packages |
NewerOlder