-- Summary: get multiple file contents into one and write it back | |
-- Config: configuration should be done directly inside source code. This one is very niche so I won't make it into a plugin | |
-- Default it will find all file (exclude hidden files, take a look at line 47) in the current directory | |
-- If needed specific file pattern then you can pass pattern into the read() function like: require'onefiler'.read("/*.zig") | |
-- Change M.filename_deco to suit your file type, I recommend make it a comment line | |
-- It will write to any file in the onefile if match, so be careful before write | |
-- Usage: | |
-- Keymap: you can assign keymap for it |
using namespace System.Management.Automation | |
using namespace System.Management.Automation.Language | |
if ($host.Name -eq 'ConsoleHost') | |
{ | |
Import-Module PSReadLine | |
} | |
#Import-Module PSColors | |
#Import-Module posh-git | |
Import-Module -Name Terminal-Icons |
The following will show you how you can modify the startup options of the SSH agent supplied by MacOS in a non-invasive way. This can be useful for doing things like setting a key lifetime, which can then be used with AddKeysToAgent
in your ~/.ssh/config
to automate the timing out of saved keys. This ensures that your passphrase is re-asked for periodically without having to shutdown, re-log, or having it actually persisted in keychain, the latter being almost as bad as having no passphrase at all, given that simply being logged in is generally enough to then use the key.
This method does not modify the system-installed SSH agent service (com.openssh.ssh-agent
), but rather duplicates its functionality into a user-installed launch agent where we can then modify the options. Modifying the system-installed service is becoming increasingly harder to do; SIP generally protects
This is a cheat sheet for how to perform various actions to ZSH, which can be tricky to find on the web as the syntax is not intuitive and it is generally not very well-documented.
Description | Syntax |
---|---|
Get the length of a string | ${#VARNAME} |
Get a single character | ${VARNAME[index]} |
These instructions include running a local registry accessible from Kubernetes as well as from the
host development machine at registry.dev.svc.cluster.local:5000
.
- Use the docker CLI to run the
registry:2
container from Docker, listening on port5000
, and persisting images in the~/.registry/storage
directory.
# Reconstructed via infocmp from file: /usr/share/terminfo/t/tmux-256color | |
tmux-256color|tmux with 256 colors, | |
OTbs, OTpt, am, hs, km, mir, msgr, xenl, AX, G0, | |
colors#256, cols#80, it#8, lines#24, pairs#32767, U8#1, | |
acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, | |
bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l, | |
clear=\E[H\E[J, cnorm=\E[34h\E[?25h, cr=^M, | |
csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, | |
cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C, | |
cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\EM, |
Running the azure-team terraform make file to create your infrastructure may not work on a Windows machine. If you cannot get it to run, install a linux distribution where you will exectute the tf files. Setting up a distribution with all of the right dependencies does involve a bit of setup to get it configured properly. The following is a list of steps you'll need to complete: