Skip to content

Instantly share code, notes, and snippets.

View vinayakkulkarni's full-sized avatar
:octocat:
Gitting it done (from 🏡)

Vinayak Kulkarni vinayakkulkarni

:octocat:
Gitting it done (from 🏡)
View GitHub Profile
@hyperupcall
hyperupcall / settings.jsonc
Last active May 3, 2024 12:52
VSCode config to disable popular extensions' annoyances (telemetry, notifications, welcome pages, etc.)
// I'm tired of extensions that automatically:
// - show welcome pages / walkthroughs
// - show release notes
// - send telemetry
// - recommend things
//
// This disables all of that stuff.
// If you have more config, leave a comment so I can add it!!
{
@Atinux
Atinux / sse.ts
Last active April 22, 2024 20:39
SSE endpoint example with Nuxt 3
// ~/server/api/sse.ts
export default defineEventHandler(async (event) => {
if (!process.dev) return { disabled: true }
// Enable SSE endpoint
setHeader(event, 'cache-control', 'no-cache')
setHeader(event, 'connection', 'keep-alive')
setHeader(event, 'content-type', 'text/event-stream')
setResponseStatus(event, 200)
@mourner
mourner / .aliases
Last active December 12, 2022 09:19
dotfiles
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../.."
# Shortcuts
alias db="cd ~/Dropbox"
alias dl="cd ~/Downloads"
alias dt="cd ~/Desktop"
alias p="cd ~/projects"
@brolnickij
brolnickij / VmGallery.vue
Last active October 12, 2021 11:40
vm-gallery
<template lang="pug">
.vm-gallery
div(
:style="{ transitionDuration: transitionDuration, transform: translate3DPosition }"
ref="galleryItems"
).vm-gallery-items
div(v-for="imageItem in imageNodes").vm-gallery-item
img(
:src="imageItem.src"
:key="imageItem.src"
@Atinux
Atinux / keybindings.json
Last active January 16, 2022 05:43
VS Code Terminal Shortcuts
[
{
"key": "ctrl+shift+n",
"command": "workbench.action.terminal.new"
},
{
"key": "ctrl+shift+right",
"command": "workbench.action.terminal.focusNext"
},
{
@sandren
sandren / tailwind.md
Last active April 26, 2024 12:37
Tailwind CSS best practices

Tailwind CSS best practices

Utility classes

  1. When writing a string of multiple utility classes, always do so in an order with meaning. The "Concentric CSS" approach works well with utility classes (i.e,. 1. positioning/visibility 2. box model 3. borders 4. backgrounds 5. typography 6. other visual adjustments). Once you establish a familiar pattern of ordering, parsing through long strings of utility classes will become much, much faster so a little more effort up front goes a long way!

  2. Always use fewer utility classes when possible. For example, use mx-2 instead of ml-2 mr-2 and don't be afraid to use the simpler p-4 lg:pt-8 instead of the longer, more complicated pt-4 lg:pt-8 pr-4 pb-4 pl-4.

  3. Prefix all utility classes that will only apply at a certain breakpoint with that breakpoint's prefix. For example, use block lg:flex lg:flex-col lg:justify-center instead of block lg:flex flex-col justify-center to make it very clear that the flexbox utilities are only applicable at the

@manimike00
manimike00 / bb2gh.sh
Last active June 27, 2019 08:18
Script for MIgrating Repo From Bitbucket to GitHub
### Step 1: Set the RSA Public Key in Both SCM (BitBucket and Github)
### Step 2: Ensure StrictHostKeyChecking no in /etc/ssh/ssh_config
### Step 3: Pass repo names as Parameter while executing the Script
### For Example: bash test.sh reponame
### Step 4: Make Sure Ensure You have same repo name in both SCM
for i in "$@"
do
git clone git@bitbucket.org:username/${i}.git
cd bbgg
@getify
getify / 1.js
Last active May 31, 2019 11:07
Force Monad #MayThe4thBeWithYou
var Force = { Skywalker, RegularFolk, of: Skywalker };
function Skywalker(v) {
return { map, chain, ap };
function map(fn) {
return Skywalker(fn(v));
}
function chain(fn) {
return fn(v);
}
@vinayakkulkarni
vinayakkulkarni / setup.md
Last active February 27, 2022 15:11
Setting up Laravel Project using Vessel on EC2

Setting up Laravel Projects using Vessel

Install Docker & docker-compose

Installing Docker

  • Update the apt package index:
sudo apt-get update