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
# Set variables | |
$LocalTempDir = $env:TEMP | |
$ChromeInstaller = "ChromeInstaller.exe" | |
$ChromeInstallerPath = "$LocalTempDir\$ChromeInstaller" | |
# Download Chrome installer | |
$DownloadUrl = "http://dl.google.com/chrome/install/375.126/chrome_installer.exe" | |
Invoke-WebRequest -Uri $DownloadUrl -OutFile $ChromeInstallerPath | |
# Install Chrome silently |
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
# https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html | |
$dlurl = "https://awscli.amazonaws.com/AWSCLIV2.msi" | |
$installerPath = Join-Path $env:TEMP (Split-Path $dlurl -Leaf) | |
$ProgressPreference = 'SilentlyContinue' | |
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 | |
Invoke-WebRequest $dlurl -OutFile $installerPath | |
Start-Process -FilePath msiexec -Args "/i $installerPath /passive" -Verb RunAs -Wait | |
Remove-Item $installerPath | |
$env:Path += ";C:\Program Files\Amazon\AWSCLIV2" |
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 | |
set -e | |
function usage() { | |
set -e | |
cat <<EOM | |
##### ecs-run ##### | |
Simple script for running tasks on Amazon Elastic Container Service | |
One of the following is required: | |
Required arguments: |
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
# looops through subdirs | |
# look for file or symlink named Makeifle | |
# creates a new one | |
for folder in $(echo *); do | |
if [ -d $folder ]; then | |
cd $folder | |
# test for file | |
if [ -f "Makefile" ] |
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/bash | |
# abbreviations refer to resource IDs | |
# security group = SG | |
# security group rule = SGR | |
# referencing security group = RGS | |
# SG to delete | |
SG=$1 |
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/bash | |
# clone to copies of the same repo, side by side | |
# add this script to the repo you want to copy from | |
# the name of the repo you want to copy to | |
REPO_NAME="myrepo" | |
# the PR number with the modifications | |
PR_NUMBER="5" |
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
AWSTemplateFormatVersion: '2010-09-09' | |
Description: 'Bootstraps Terraform S3 backend' | |
Parameters: | |
AccountId: | |
Type: 'String' | |
Description: 'Account ID of the account that will manage state in this bucket (leave blank if the state is for this AWS account)' | |
CreateDynamoDB: | |
Default: true | |
Type: String |
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 python3 | |
import glob | |
import os.path | |
root_dir = '' | |
def filename_hook(filename): | |
print(filename) |
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
insert into myschema.mytable | |
with ten_numbers as (select 1 as num union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9 union select 0) | |
,generted_numbers AS | |
( | |
SELECT (1000*t1.num) + (100*t2.num) + (10*t3.num) + t4.num-5000 as gen_num | |
FROM ten_numbers AS t1 | |
JOIN ten_numbers AS t2 ON 1 = 1 | |
JOIN ten_numbers AS t3 ON 1 = 1 | |
JOIN ten_numbers AS t4 ON 1 = 1 |
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/bash | |
[ -f nohup.log ] && rm -f nohup.log | |
nohup \ | |
yes \ | |
> nohup.log 2>&1 & |
NewerOlder