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
| # docker run -it -v /var/tmp/mysocket:/var/tmp/mysocket ubuntu /bin/bash | |
| # apt update | |
| # apt install netcat-openbsd | |
| echo "from inside a container" | nc -U /var/tmp/mysocket |
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
| $sourceFolder = ".\originalfil" | |
| $destinationfolder = "." | |
| $archiveFolder = ".\originalfil\gamla" | |
| $Source = @" | |
| using System; | |
| namespace Geosigma { | |
| public static class Tools { | |
| public static DateTime RoundUp(DateTime dt, TimeSpan d) | |
| { |
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
| setup-x86_64.exe -p zip unzip man vim openssh openssl tcp_wrappers inetutils cygrunsrv -q |
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
| export CLUSTER_NAME=my-cluster | |
| export ACCESS_KEY= | |
| export SECRET_KEY= | |
| ecs-cli configure profile --profile-name $CLUSTER_NAME --access-key $ACCESS_KEY --secret-key $SECRET_KEY | |
| ecs-cli up --ecs-profile $CLUSTER_NAME --launch-type FARGATE --cluster $CLUSTER_NAME | |
| # VPC created: vpc-0638eed48e760f161 | |
| # Subnet created: subnet-09d4ee4807d3a9553 | |
| # Subnet created: subnet-01f6f6ee7acb3d632 | |
| # Cluster creation succeeded. |
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
| > env | |
| USER=me | |
| > cat file.txt | |
| I love $USER | |
| > ./envsub.py file.txt | |
| I love me |
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
| const originalFetch = fetch; | |
| // eslint-disable-next-line | |
| fetch = (url, options) => { | |
| return originalFetch.apply(window, [url, options]).then(response => { | |
| if (response.ok) { | |
| return response; | |
| } | |
| if (response.redirected) { | |
| // make sure request method is GET | |
| options.method = "GET"; |
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 | |
| set -e | |
| cd /Users/peter/Music/Logic/ | |
| aws s3 sync ./ s3://helenefors-peter/Music/Logic/ | |
| cd /Volumes/Untitled/ | |
| # dfold --execute | |
| aws s3 sync ./ s3://helenefors-peter/Pictures/ |
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
| { | |
| "name": "a-node", | |
| "chef_environment": "an-environment", | |
| "run_list": [ | |
| "recipe[cb1]", | |
| "recipe[cb2]" | |
| ] | |
| , | |
| "normal": { | |
| "tags": [ |
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
| C F C | |
| When you're weary, feeling small, | |
| F Bb F C F C | |
| When tears are in your eyes, I will dry them all; | |
| C G Am G C | |
| I'm on your side. When times get rough | |
| C F D G | |
| And friends just can't be found, | |
| C F G C | |
| Like a bridge over troubled water |
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 | |
| set -o errexit | |
| # set -o nounset | |
| set -o pipefail | |
| if [ "$(whoami)" = "root" ] | |
| then | |
| echo "Run as default user instead of root!" | |
| exit 1 |