Create unit file:
MY_SERVICE_NAME=myapp
MY_DESCR=My service description
MY_EXEC=/opt/MY_SERVICE_NAME/bin/MY_SERVICE_NAME
cat << EOF > /etc/systemd/system/$MY_SERVICE_NAME.service
[Unit]
Description=$MY_DESCR
After=network.target
| cd /home/ubuntu | |
| sudo apt-get update | |
| sudo apt-get install ruby wget | |
| wget https://aws-codedeploy-us-west-2.s3.us-west-2.amazonaws.com/latest/install | |
| chmod +x ./install | |
| sudo ./install auto | |
| rm install |
Create unit file:
MY_SERVICE_NAME=myapp
MY_DESCR=My service description
MY_EXEC=/opt/MY_SERVICE_NAME/bin/MY_SERVICE_NAME
cat << EOF > /etc/systemd/system/$MY_SERVICE_NAME.service
[Unit]
Description=$MY_DESCR
After=network.target
| #!/bin/sh | |
| export LC_ALL=C | |
| sudo apt-get update -y | |
| sudo apt install python3-pip -y | |
| sudo pip3 install --upgrade pip | |
| sudo pip3 install awscli --upgrade |
Script to update a Route53 DNS record with the assigned public (non-elastic) IP at each reboot.
| *.swp | |
| *.*~ | |
| project.lock.json | |
| .DS_Store | |
| *.pyc | |
| # Visual Studio Code | |
| .vscode | |
| # User-specific files |
| # Get every Name property from every object in the Variables array as a raw string. | |
| cat sat.json | jq '.Variables' | jq -r '.[] | .Name ' |
| <html> | |
| <head> | |
| <script> | |
| function generateKey(alg, scope) { | |
| return new Promise(function(resolve) { | |
| var genkey = crypto.subtle.generateKey(alg, true, scope) | |
| genkey.then(function (pair) { | |
| resolve(pair) | |
| }) | |
| }) |
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "net/http" | |
| ) | |
| func main() { | |
| http.HandleFunc("/", handler) |
| FILE SPACING: | |
| # double space a file | |
| sed G | |
| # double space a file which already has blank lines in it. Output file | |
| # should contain no more than one blank line between lines of text. | |
| sed '/^$/d;G' |
| # remove '@' extended attributes | |
| sudo xattr -c SoapUIProjects | |
| # remove '+' extended ACL | |
| chmod -R -N SoapUIProjects |