Skip to content

Instantly share code, notes, and snippets.

View gj1118's full-sized avatar
🦋

Gagan Janjua gj1118

🦋
View GitHub Profile
@gj1118
gj1118 / helix
Created April 28, 2023 19:09
my helix config
# this seems to be a nice resource for keybindings
# https://github.com/matejc/helper_scripts/blob/71b0040640da989afa5c618e879ca2d3de263d9d/dotfiles/helix.nix#L166
theme="harneet"
[editor.cursor-shape]
insert = "block"
normal = "block"
select = "underline"
@gj1118
gj1118 / logging.go
Created October 18, 2022 23:09
using Lumberjack and Zerolog
package main
import (
"log"
"os"
"path"
"strings"
"github.com/rs/zerolog"
"gopkg.in/natefinch/lumberjack.v2"
@gj1118
gj1118 / cloudsettings.txt
Created February 20, 2020 00:00
vscode settings
myvscode settings
@gj1118
gj1118 / getListOfAllPackages.py
Created August 17, 2019 20:33
get list of all packages installed in sublime text
import os; [(os.path.dirname(file)[len('Packages/'):], sublime.decode_value(sublime.load_resource(file))['url']) for file in sublime.find_resources('package-metadata.json')]
<snippet>
<content>
<![CDATA[
{/**${SELECTION} **/}
]]>
</content>
<tabTrigger>comment</tabTrigger>
<description>Comment React code</description>
<scope>source.js</scope>
</snippet>
@gj1118
gj1118 / .vimrc
Created May 13, 2019 00:13
my basic VIMRC file
set nobackup
set noswapfile
syntax enable
syntax on
set number
set runtimepath^=~/.vim/bundle/ctrlp.vim
set t_Co=256
@gj1118
gj1118 / dark_monokai_slack.css
Last active February 16, 2019 05:13
dark monokai theme for slack
body {
background: #282A3B;
color: #e6e6e6;
}
a {
color: #949494;
}
a:link,
@gj1118
gj1118 / clog.sublime-snippet
Created April 19, 2018 14:20
custom console.log snippet for Sublime text
<snippet>
<content><![CDATA[
console.log('%c ${1:this} '+ ${2:undefined}, 'background: ${3:white};font-size:18px; color: ${4:#bada55}');
]]></content>
<tabTrigger>clog</tabTrigger>
<scope>source.js</scope>
</snippet>
@gj1118
gj1118 / 0_reuse_code.js
Created September 30, 2015 20:06
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@gj1118
gj1118 / laravel.js
Last active August 29, 2015 14:27 — forked from soufianeEL/laravel.js
You use Laravel 5 and you want to send a DELETE request without creating a form? This will handle the form-creation bits for you dynamically, similar to the Rails implementation. To use, import script, and create a link with the `data-method="DELETE"` and `data-token="{{csrf_token()}}"` attributes.
/*
Exemples :
<a href="posts/2" data-method="delete" data-token="{{csrf_token()}}">
- Or, request confirmation in the process -
<a href="posts/2" data-method="delete" data-token="{{csrf_token()}}" data-confirm="Are you sure?">
*/
(function() {