- Bash/zsh completion
- use Tab to populate command line, narrows down options as you go, fills in container names, ID's, images, volumes. Huge time saver.
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
get_latest_release() { | |
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api | |
grep '"tag_name":' | # Get tag line | |
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value | |
} | |
# Usage | |
# $ get_latest_release "creationix/nvm" | |
# v0.31.4 |
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
<?php | |
$projects = []; | |
$projects[] = [ | |
'Project path', | |
'Owner', | |
'Name', | |
'Description', | |
'Created', |
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
$cert = (New-SelfSignedCertificate -DnsName localhost -CertStoreLocation cert:Localmachine\My).Thumbprint | |
New-WebBinding -Name "Default Web Site" -IP "*" -Port 443 -Protocol https | |
Get-Item cert:\LocalMachine\MY\$cert | New-Item IIS:\SslBindings\0.0.0.0!443 |
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
Function New-WindowsTerminalProfile { | |
[cmdletbinding(SupportsShouldProcess)] | |
Param( | |
[Parameter(Position = 0, Mandatory)] | |
[ValidateNotNullOrEmpty()] | |
[alias("name")] | |
[string]$ProfileName, | |
[Parameter( Mandatory)] | |
[ValidateNotNullOrEmpty()] |
In the last few months, I had to write multiple Ansible playbooks, to the point that the slow write/test cycle became a major annoyance. What seemed to work well for me was a mix between Ansible tags and Vagrant snapshots. I would be happy to hear what workflow others employ, that specifically minimizes the time they spend testing.
Vagrantfile
Vagrant.configure("2") do |config|
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
#!/usr/bin/env python | |
import argparse | |
import sys | |
from collections import Counter | |
def main(paths, n=100): | |
counter = Counter() | |
for path in paths: | |
print(path) |
OlderNewer