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
n := time.Now() | |
rand.Seed(n.UnixNano()) | |
// Keep track of the minimum and maximum age | |
e := n.AddDate(-minAge, 0, 0).Unix() | |
s := n.AddDate(-maxAge, 0, 0).Unix() | |
// Take the delta of the date and print it out, return it, whatever | |
sec := rand.Int63n(e-s) + s | |
fmt.Sprintf("%v", time.Unix(sec, 0)) |
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
// Generate a random number between a range. | |
rand.Seed(time.Now().UnixNano()) | |
rand.Intn(max - min) + min | |
// Generate a random number with a minimum value | |
rand.Seed(time.Now().UnixNano()) | |
rand.Int() + min |
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 -e | |
# Edit this list | |
REPOS=( | |
/Users/me/repo1 | |
/Users/me/repo2 | |
/Users/me/repo3 | |
) | |
for i in “${REPOS[@]}” | |
do |
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
### Keybase proof | |
I hereby claim: | |
* I am shiraazmoollatjie on github. | |
* I am shiraazl (https://keybase.io/shiraazl) on keybase. | |
* I have a public key ASCSVWnO9FlsviyaWIUd2W8yjqHcku8rCN8K8z4tad-b-wo | |
To claim this, I am signing this object: |
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
resource "null_resource" "echo" { | |
count = "${var.number_of_instances}" | |
triggers { | |
ec2_servers = "${join(",", module.base_module.ip_addresses)}" | |
} | |
connection { | |
host = "${element(module.base_module.ip_addresses, count.index)}" | |
} |
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
sudo usermod -aG vboxsf <your username> |
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
# Assumes that you have virtualbox installed | |
# Save this as a file and run it as | |
# powershell -f registerMachineAndMountIso.ps1 | |
param( | |
[string]$VM_NAME = "Budgie_64Bit", | |
[string]$VM_ISO = "D:\linux-isos\ubuntu-budgie-18.04-desktop-amd64.iso" | |
) | |
# Register VM so that you can see it on VirtualBox Manager |