Skip to content

Instantly share code, notes, and snippets.

@codequokka
codequokka / fzf-examples-on.zsh
Created November 12, 2022 22:05
fzf examples on zsh
# -----------------------------------------------------------------------------
# Fzf
# -----------------------------------------------------------------------------
function fzf-select-history() {
BUFFER=$(history -n -r 1 | fzf --no-sort --query="$LBUFFER")
CURSOR=$#BUFFER
zle reset-prompt
}
zle -N fzf-select-history
bindkey '^r' fzf-select-history
local wezterm = require 'wezterm'
local act = wezterm.action
return {
-- default_program = { 'powershell.exe', '-NoLogo' },
color_scheme = 'NightOwl (Gogh)',
window_background_opacity = 0.9,
keys = {
-- {
@codequokka
codequokka / vscode-settings.json
Last active July 18, 2023 21:15
vscode-settings.json
{
//
// Editor
//
"editor.fontFamily": "MesloLGS NF",
"editor.fontSize": 15,
"editor.smoothScrolling": true,
"editor.cursorSmoothCaretAnimation": "on",
"editor.minimap.enabled": false,
"editor.formatOnSave": true,
# -----------------------------------------------------------------------------
# SSH
# -----------------------------------------------------------------------------
if [ -f ~/.ssh-agent ]; then
. ~/.ssh-agent
fi
if [ -z "$SSH_AGENT_PID" ] || ! kill -0 $SSH_AGENT_PID; then
ssh-agent > ~/.ssh-agent
. ~/.ssh-agent
// If you'd like to override the default keybindings completely, be sure to change "keybinds" to "keybinds clear-defaults=true"
keybinds {
normal {
// uncomment this and adjust key if using copy_on_select=false
// bind "Alt c" { Copy; }
}
locked {
bind "Ctrl g" { SwitchToMode "Normal"; }
}
resize {
@codequokka
codequokka / gist:2441934b2934c5f989098e58502554cd
Last active July 18, 2023 21:14
vscode-keybindings.json
// Place your key bindings in this file to override the defaults
[
// SideBar
{
"key": "shift+alt+b",
"command": "workbench.action.toggleSidebarVisibility"
},
{
"key": "ctrl+b",
"command": "-workbench.action.toggleSidebarVisibility"
// Place your key bindings in this file to override the defaults
[
// Workbench
{
"key": "ctrl+p",
"command": "workbench.action.quickOpen"
},
// SideBar
{
"key": "shift+alt+b",
#!/usr/bin/pwsh
param(
[parameter(mandatory = $true)][string]$Server,
[parameter(mandatory = $true)][string]$User,
[parameter(mandatory = $true)][string]$Password,
[parameter(mandatory = $true)][string]$Datacenter
)
function Connect-Vcenter() {
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/go
{
"name": "Go",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/go:1-1.21-bullseye",
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
@codequokka
codequokka / Vagrantfile
Created December 16, 2023 01:34
Vagrant file for deploying the rancher k8s cluster
vm_spec = [
{
name: "rancher-step-01",
cpu: 4,
memory: 8192,
private_ip: "192.168.3.11",
storage: "100GB"
},
{
name: "rancher-server-01",