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
## MFA Authentication | |
temp_role=$(aws sts get-session-token --serial-number arn:aws:iam::XXXXXXX:mfa/[email protected] \ | |
--token-code 000000) | |
export AWS_ACCESS_KEY_ID=$(echo $temp_role | jq -r .Credentials.AccessKeyId) | |
export AWS_SECRET_ACCESS_KEY=$(echo $temp_role | jq -r .Credentials.SecretAccessKey) | |
export AWS_SESSION_TOKEN=$(echo $temp_role | jq -r .Credentials.SessionToken) | |
## Assume Role | |
export ASSUME_ROLE_ARN=arn:aws:iam::000000:role/foobar |
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 | |
open -na "PyCharm CE.app" --args "${PWD}/$@" |
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
apiVersion: v1 | |
kind: Service | |
metadata: | |
labels: | |
app: rev | |
name: rev | |
spec: | |
ports: | |
- name: http | |
port: 80 |
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
<?php | |
// usage: php renamefiles.php /path/to/dir | |
$photosDir = $_SERVER['argv']['1']; | |
$files = scandir($photosDir); | |
foreach ($files as $file) { | |
if ($file == '.' || $file == '..') { | |
continue; | |
} |