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
def smiley | |
# this is also possible | |
# %w[ :-) X-) ;-) :-( B-D B-D ].sample | |
[":-)", "X-)", ";-)", ":-(", "B-D"].sample | |
end | |
(0..100).each {|x| puts "#{ ' '*x }#{smiley}"} |
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
# Source: https://gist.github.com/vfarcic/8ebbf4943c5c012c8c98e1967fa7f33b | |
##################################################################### | |
# Say Goodbye to Containers - Ephemeral Environments with Nix Shell # | |
##################################################################### | |
# Additional Info: | |
# - Nix: https://nixos.org | |
# - Dagger: The Missing Ingredient for Your Disastrous CI/CD Pipeline: https://youtu.be/oosQ3z_9UEM |
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
function faz() { | |
az account set --subscription $(az account list -o table | fzf | cut -c '62-98') | |
az account show | |
} |
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
<# | |
Create Unix VM's. | |
PREREQUISITES: | |
- A VM that has been installed with an OS that supports cloud-init | |
- cloud-init is installed on the vm | |
How it works: | |
- Asks for a bunch of parameters | |
- Creates a disk from parent vhdx for speed |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Copy-Paste from Website to Terminal</title> | |
</head> | |
<style> | |
.codeblock { | |
background-color: lightyellow; | |
border: 1px dotted blue; | |
margin-left: 50px; |
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
export $(aws sts assume-role --role-arn arn:aws:iam::$TARGET_ACCOUNT_ID:role/ci-access --role-session-name ci --output text --query "[['AWS_ACCESS_KEY_ID',Credentials.AccessKeyId],['AWS_SECRET_ACCESS_KEY',Credentials.SecretAccessKey],['AWS_SESSION_TOKEN',Credentials.SessionToken]][*].join(\`=\`,@)") |
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
find . -type f | xargs -I {} bash -c "iconv -f utf-8 -t utf-16 {} &>/dev/null || echo {}" > utf8_fail |
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
{{- define "flatten_list" -}} | |
{{- $output := list -}} | |
{{- range . -}} | |
{{- if (kindIs "slice" . ) -}} | |
{{- $output = (concat $output ( get (fromYaml (include "flatten_list" . ) ) "list" ) ) -}} | |
{{- else -}} | |
{{- $output = (append $output . ) -}} | |
{{- end -}} | |
{{- end -}} | |
{{- toYaml (dict "list" $output) -}} |
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
$Path = $env:TEMP; $Installer = 'chrome_installer.exe'; Invoke-WebRequest -Uri 'http://dl.google.com/chrome/install/375.126/chrome_installer.exe' -OutFile $Path\$Installer; Start-Process -FilePath $Path\$Installer -Args '/silent /install' -Verb RunAs -Wait; Remove-Item -Path $Path\$Installer | |
# Thank you, nicolaigj! |
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
# in ~/Library/KeyBindings/DefaultKeyBinding.dict | |
{ | |
"~ " = ("insertText:", " "); | |
} |
NewerOlder