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
@vinayakkulkarni
vinayakkulkarni / vscode.json
Created May 18, 2018 09:36
VSCode 18 May 2018
{
"editor.tabSize": 2,
"editor.fontSize": 15,
"editor.fontFamily": "Operator Mono, Monaco, 'Courier New', monospace",
"editor.lineHeight": 24,
"editor.fontLigatures": true,
"editor.tabCompletion": true,
"editor.formatOnSave": true,
"explorer.decorations.badges": false,
"editor.multiCursorModifier": "ctrlCmd",
@vinayakkulkarni
vinayakkulkarni / fix-homebrew-npm.md
Created May 26, 2018 16:27 — forked from DanHerbert/fix-homebrew-npm.md
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

Solution

This solution fixes the error caused by trying to run npm update npm -g. Once you're finished, you also won't need to use sudo to install npm modules globally.

Before you start, make a note of any globally installed npm packages. These instructions will have you remove all of those packages. After you're finished you'll need to re-install them.

@vinayakkulkarni
vinayakkulkarni / vscode.json
Created August 13, 2018 11:22
VSCode on macOS User settings - 13 Aug 2018
{
"editor.tabSize": 2,
"editor.fontSize": 15,
"editor.fontFamily": "Dank Mono, Monaco, 'Courier New', monospace",
"editor.lineHeight": 26,
"editor.fontLigatures": true,
"editor.tabCompletion": true,
"editor.formatOnSave": true,
"explorer.decorations.badges": false,
"editor.multiCursorModifier": "ctrlCmd",
<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style>
body {
background: repeat url('data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/7QCIUGhvdG9zaG9wIDMuMAA4QklNBAQAAAAAAGscAVoAAxslRxwCAAACAAAcAnQAV8KpIENoYWV5b3VuZ1dpbGxOZXZlckNoYWVvbGQgLSBodHRwOi8vd3d3LnJlZGJ1YmJsZS5jb20vcGVvcGxlL0NoYWV5b3VuZ1dpbGxOZXZlckNoYWVvbAD/4gxYSUNDX1BST0ZJTEUAAQEAAAxITGlubwIQAABtbnRyUkdCIFhZWiAHzgACAAkABgAxAABhY3NwTVNGVAAAAABJRUMgc1JHQgAAAAAAAAAAAAAAAAAA9tYAAQAAAADTLUhQICAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABFjcHJ0AAABUAAAADNkZXNjAAABhAAAAGx3dHB0AAAB8AAAABRia3B0AAACBAAAABRyWFlaAAACGAAAABRnWFlaAAACLAAAABRiWFlaAAACQAAAABRkbW5kAAACVAAAAHBkbWRkAAACxAAAAIh2dWVkAAADTAAAAIZ2aWV3AAAD1AAAACRsdW1pAAAD+AAAABRtZWFzAAAEDAAAACR0ZWNoAAAEMAAAAAxyVFJDAAAEPAAACAxnVFJDAAAEPAAACAxiVFJDAAAEPAAACAx0ZXh0AAAAAENvcHlyaWdodCAoYykgMTk5OCBIZXdsZXR0LVBhY2thcmQgQ29tcGFueQAAZGVzYwAAAAAAAAASc1JHQiBJRUM2MTk2Ni0yLjEAAAAAAAAAAAAAABJzUkdCIElFQzYxOTY2LTIuMQAAAAAAAA
@vinayakkulkarni
vinayakkulkarni / axios-error-handling.js
Created October 15, 2018 09:55
API Middleware using axios
class Api {
constructor() {}
call(requestType, url, data = null) {
return new Promise((resolve, reject) => {
axios[requestType](url, data)
.then((response) => {
resolve(response);
})
.catch(({ response, request, message }) => {
@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
@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":

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 / currency.html
Created October 17, 2016 10:14
Currencies in Semantic-UI
<!-- Make sure you have Semantic-UI libs include
Also, Ensure you import jQuery for smooth transition
Once you have all the imports add this to your html:
<script type="text/javascript">
$(document).ready(function() {
$('.dropdown').dropdown();
});
</script>
-->
<div class="field">
@vinayakkulkarni
vinayakkulkarni / timezone.html
Last active February 6, 2020 21:45
TimeZone Snippet for Semantic-UI
<!-- Make sure you have Semantic-UI libs include
Also, Ensure you import jQuery for smooth transition
Once you have all the imports add this to your html:
<script type="text/javascript">
$(document).ready(function() {
$('.dropdown').dropdown();
$('.ui.checkbox').checkbox();
});
</script>