Skip to content

Instantly share code, notes, and snippets.

@codequokka
codequokka / rgv.bash
Last active July 29, 2020 21:26
Grep the string and open the file in the exact location where it exists on bash
# Grep the string and open the file in the exact location where it exists
rgv() {
if [ $# -eq 0 ]; then
echo 'Need a string to search for!'
echo 'Usage: rgv string'
return 1
fi
search_words=$@
// Place your key bindings in this file to override the defaults
[
{
"key": "ctrl+f",
"command": "cursorRight",
"when": "terminalFocus"
},
{
"key": "ctrl+e",
"command": "workbench.action.quickOpen",
apiVersion: v1
clusters:
- cluster:
certificate-authority: /mnt/c/Users/nbchk/.minikube/ca.crt
server: https://192.168.99.100:8443
name: minikube
contexts:
- context:
cluster: minikube
user: minikube
{
"terminal.integrated.fontFamily": "MesloLGS NF",
"editor.fontSize": 15,
"editor.fontFamily": "'MesloLGS NF'",
"terminal.integrated.fontSize": 15,
"editor.minimap.enabled": false,
"workbench.list.smoothScrolling": true,
"editor.cursorSmoothCaretAnimation": true,
"editor.smoothScrolling": true,
"workbench.iconTheme": "material-icon-theme",
{
"workbench.iconTheme": "material-icon-theme",
"workbench.colorTheme": "Solarized Dark",
"files.insertFinalNewline": true,
"terminal.integrated.commandsToSkipShell": [
"-workbench.action.quickOpen",
"-workbench.action.terminal.focusFindWidget"
],
// Vim
"vim.hlsearch": true,
// 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"
// This file was initially generated by Windows Terminal 1.6.10571.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{2c4de342-38b7-51cf-b940-2309a097f518}",
// You can add more global application settings here.
@codequokka
codequokka / get-aws-session-token.sh
Created June 7, 2022 10:24
get-aws-session-token.sh
#!/bin/bash
# get-session-token.sh
# ====================
#
# Get session token
#
# Options:
# -h Show this help
#
@codequokka
codequokka / start-tmux-automatically-on-zsh.zsh
Last active May 11, 2024 22:32
Start tmux automatically on zsh
# Start the tmux session if not alraedy in the tmux session
if [[ ! -n $TMUX ]]; then
# Get the session IDs
session_ids="$(tmux list-sessions)"
# Create new session if no sessions exist
if [[ -z "$session_ids" ]]; then
tmux new-session
fi
@codequokka
codequokka / running-stackstrom-on-docker@ubuntu22.04.md
Created November 11, 2022 22:53
Running StackStrom on docker@ubuntu22.04