Skip to content

Instantly share code, notes, and snippets.

@subeeshb
subeeshb / rm_node_modules.py
Created May 28, 2014 04:38
Python script to delete node_modules on windows
import os, shutil
folders = []
for path, dirs, files in os.walk("./node_modules"):
head, tail = os.path.split(path)
if tail == 'node_modules':
folders.append(path)
os.mkdir('./temp_node_modules')
@subeeshb
subeeshb / bst.js
Created June 22, 2015 15:03
binary search tree - pretty print
/*
* Binary Search Tree implementation in JavaScript
* Copyright (c) 2009 Nicholas C. Zakas
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
@subeeshb
subeeshb / typescriptreact.json
Last active May 1, 2021 04:15
Functional component snippet for TS
"component": {
"prefix": "component",
"body": [
"import * as React from 'react';",
"",
"type Props = {};",
"",
"function ${TM_FILENAME_BASE}(props: Props): JSX.Element {",
" return (",
" <div>$0</div>",