Skip to content

Instantly share code, notes, and snippets.

View vaibhav-kaushal's full-sized avatar
:octocat:
Simplicity is the ultimate sophistication.

Vaibhav Kaushal vaibhav-kaushal

:octocat:
Simplicity is the ultimate sophistication.
View GitHub Profile
@vaibhav-kaushal
vaibhav-kaushal / gist:15598856c2dc4ec9be70d5158b8a1528
Created November 22, 2016 07:30 — forked from wacko/gist:5577187
SSH between Mac OS X host and Virtual Box guest

On Mac OS (host):

Shutdown your VM and do:

VirtualBox > Settings > Network > Add (you will get vboxnet0)

On a terminal ifconfig will show you new interface vboxnet0

VM's Settings > System > check "Enable I/O APIC." VM's Settings > Network > Adapter 2 > host-only vboxnet0

@vaibhav-kaushal
vaibhav-kaushal / a_phar.md
Created July 26, 2018 13:16
Create a PHP Phar file

Create a PHP Phar file

Run: php create-phar.php

app.phar successfully created

Start a phar file

Run: php app.phar

@vaibhav-kaushal
vaibhav-kaushal / deploy.sh
Last active February 16, 2019 13:14
The Ruby on Rails Deployment Script
#!/usr/bin/env bash
# ============================================================================
# This is a Ruby on Rails (RoR) Deployment script to deploy an existing RoR
# application. The entire guide (explaining all details and setup) is located
# at:
#
# https://vaibhavkaushal.com/rails-deployment/
#
# If you are interested in only understanding what this script does in
@vaibhav-kaushal
vaibhav-kaushal / test.go
Created November 6, 2019 04:11
Test gist
package "main"
import "fmt"
func main() {
fmt.Println("test")
}
@vaibhav-kaushal
vaibhav-kaushal / buffered_channel.go
Created April 14, 2022 15:58
A sample to show how buffered channels and tickers can be worked on together.
package main
import (
"fmt"
"sync"
"time"
)
var numberChan chan int64
@vaibhav-kaushal
vaibhav-kaushal / bark-logmsg-parse.md
Last active October 7, 2023 15:42
Bark log parser behavior

Assuming the Default Level is INFO and Default code is 000000

String sent Level Log Message ID Log message
D#LMID1 - Log message1 DEBUG LMID1 Log message1
I#LMID2 - Log message2 INFO LMID2 Log message2
N#LMID3 - Log message3 NOTICE LMID3 Log message3
W#LMID4 - Log message4 WARN LMID4 Log message4
E#LMID5 - Log message5 ERROR LMID5 Log message5
A#LMID6 - Log message6 ALERT LMID6 Log message6
-- Read the docs: https://www.lunarvim.org/docs/configuration
-- Video Tutorials: https://www.youtube.com/watch?v=sFA9kX-Ud_c&list=PLhoH5vyxr6QqGu0i7tt_XoVK9v-KvZ3m6
-- Forum: https://www.reddit.com/r/lunarvim/
-- Discord: https://discord.com/invite/Xb9B4Ny
-- better window management
vim.api.nvim_set_keymap('n', '<C-h>', '<C-w>h', {silent = true})
vim.api.nvim_set_keymap('n', '<C-i>', '<C-w>i', {silent = true})
vim.api.nvim_set_keymap('n', '<C-k>', '<C-w>k', {silent = true})
vim.api.nvim_set_keymap('n', '<C-l>', '<C-w>l', {silent = true})