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
{
"editor.accessibilitySupport": "off",
"editor.tabSize": 2,
"editor.fontSize": 15,
"terminal.integrated.fontFamily": "Dank Mono, Monaco, 'Courier New', monospace",
"editor.fontFamily": "Dank Mono, Monaco, 'Courier New', monospace",
"editor.lineHeight": 26,
"editor.fontLigatures": true,
"editor.multiCursorModifier": "ctrlCmd",
"editor.snippetSuggestions": "top",
@vinayakkulkarni
vinayakkulkarni / VmGallery.vue
Created October 10, 2021 03:23 — forked from brolnickij/VmGallery.vue
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"
@vinayakkulkarni
vinayakkulkarni / csv.worker.ts
Created September 14, 2021 09:48
CSV to GeoJSON Parser in Web Worker
import { csvParse } from 'd3-dsv';
import { Feature, FeatureCollection, Point } from 'geojson';
function snooze(ms: number): Promise<void> {
return new Promise((resolve) => setTimeout(resolve, ms));
}
addEventListener('message', async (event: MessageEvent) => {
const { payload, sleep } = event.data.message;
await snooze(sleep);
@vinayakkulkarni
vinayakkulkarni / profile.vue
Last active February 26, 2021 12:50
Demo.vue
<script lang="ts">
import { useProfile } from '@/hooks/profile';
import { useContext } from '@nuxtjs/composition-api';
export default defineComponent({
setup() {
const { $axios } = useContext();
const { getUser, profile } = useProfile($axios);
return { profile };
}
})
@vinayakkulkarni
vinayakkulkarni / setup.md
Created June 9, 2020 09:06
Mounting NVMe EBS for AWS EC2 Nitro Instances

Ensure you have the ebs attached.

$ lsblk

Once you find the blk id, create xfs type filesystem

$ sudo mkfs -t xfs /dev/nvme1n1
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vinayakkulkarni
vinayakkulkarni / SSL.md
Created April 28, 2020 06:45 — forked from gangsta/SSL.md
How to Setting Up a Comodo SSL Cert

How to Setting Up a Comodo SSL Cert

  • I advice you to buy SSL Certs from officially Comodo only , or some SSL reseller whose you trust.

These are the steps I went through to set up an SSL cert. Purchase the cert

Prior to purchasing a cert, you need to generate a private key, and a CSR file (Certificate Signing Request). You’ll be asked for the content of the CSR file when ordering the certificate:

openssl req -new -newkey rsa:2048 -nodes -keyout example_com.key -out example_com.csr

Keybase proof

I hereby claim:

  • I am vinayakkulkarni on github.
  • I am vinayak (https://keybase.io/vinayak) on keybase.
  • I have a public key ASCxgMkTIndvwScAt_z3yUKxx2JAbkCpJoWNOx2ft4W_Ogo

To claim this, I am signing this object:

@vinayakkulkarni
vinayakkulkarni / test.json
Created December 9, 2019 12:38
10000 payload
This file has been truncated, but you can view the full file.
[
{ "seq": 1, "name_first": "Christopher", "name_last": "Rivera", "age": 58, "street": "Rahop Park", "city": "Ozuaruavi", "state": "GA", "zip": 69322, "dollar": "$4192.07", "pick": "WHITE", "date": "07/23/2032", "seq_1": 1, "name_first_1": "Clarence", "name_last_1": "Webb", "age_1": 56, "street_1": "Vorbo Extension", "city_1": "Ahiireni", "state_1": "UT", "zip_1": 61595, "dollar_1": "$4936.89", "pick_1": "WHITE", "date_1": "05/20/1938" },
{ "seq": 2, "name_first": "Ray", "name_last": "Barker", "age": 34, "street": "Peuk View", "city": "Kaebpi", "state": "OR", "zip": 13622, "dollar": "$1073.74", "pick": "YELLOW", "date": "08/26/2042", "seq_1": 2, "name_first_1": "Agnes", "name_last_1": "Cox", "age_1": 42, "street_1": "Ejehe Plaza", "city_1": "Batizku", "state_1": "NE", "zip_1": 5831, "dollar_1": "$7897.86", "pick_1": "RED", "date_1": "11/24/2047" },
{ "seq": 3, "name_first": "Derek", "name_last": "Weber", "age":
@vinayakkulkarni
vinayakkulkarni / example.py
Created January 23, 2019 13:32 — forked from Lukasa/example.py
Requests and Beautiful Soup example, following the form of http://bpaste.net/show/kMetvCdrfnzh5RgiUKU4/
from BeautifulSoup import BeautifulSoup
import requests
import urlparse
URL = 'example.com'
s = requests.Session()
def fetch(url, data=None):
if data is None:
return s.get(url).content