aws cloudformation create-stack --stack-name hogehoge --template-body file://conf.yaml --region ap-northeast-1 --parameters file://param.yaml
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
# plucked from https://stackoverflow.com/a/25180186 | |
#!/bin/bash | |
# Read a string with spaces using for loop | |
for value in I like programming | |
do | |
echo $value | |
done |
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
#!/bin/bash | |
OF=/var/my-backup-$(date +%Y%m%d).tgz | |
tar -cZf $OF /home/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
# snagged from https://stackoverflow.com/a/30988704 | |
# Use the mapfile command: | |
mapfile -t myArray < file.txt | |
# The error is using for -- the idiomatic way to loop over lines of a file is: | |
while IFS= read -r line; do echo ">>$line<<"; done < file.txt |
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
## Snagged from https://stackoverflow.com/a/20983251 | |
# Black 0;30 Dark Gray 1;30 | |
# Red 0;31 Light Red 1;31 | |
# Green 0;32 Light Green 1;32 | |
# Brown/Orange 0;33 Yellow 1;33 | |
# Blue 0;34 Light Blue 1;34 | |
# Purple 0;35 Light Purple 1;35 | |
# Cyan 0;36 Light Cyan 1;36 | |
# Light Gray 0;37 White 1;37 |
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
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux |
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
@ECHO off | |
SETLOCAL | |
:: DateMath, a general purpose date math routine | |
:: If DateMath detects an error, variable _dd_int is set to 999999. | |
SET v_dd_int=0 | |
SET v_mm_int=0 | |
SET v_yy_int=0 | |
SET v_ymd_str= | |
SET v_mm_str= |
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
USE BizActorMDBImport | |
DECLARE @SearchStr nvarchar(100) = '90_120' | |
DECLARE @Results TABLE (ColumnName nvarchar(370), ColumnValue nvarchar(3630)) | |
SET NOCOUNT ON | |
DECLARE @TableName nvarchar(256), @ColumnName nvarchar(128), @SearchStr2 nvarchar(110) | |
SET @TableName = '' | |
SET @SearchStr2 = QUOTENAME('%' + @SearchStr + '%','''') |
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
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" | |
cinst -y --ignore-checksums` | |
choco feature enable -n=allowGlobalConfirmation | |
choco install googlechrome | |
choco install firefox | |
choco install brave | |
choco install greenshot | |
choco install microsoft-teams | |
choco install octopustools | |
choco install flashplayerplugin |
A Pen by Karl Danninger on CodePen.