Skip to content

Instantly share code, notes, and snippets.

View ConradSollitt's full-sized avatar
😀
I may be slow to respond.

Conrad Sollitt ConradSollitt

😀
I may be slow to respond.
View GitHub Profile
@ConradSollitt
ConradSollitt / jsx-transformer.js
Last active December 10, 2020 07:59
Convert JSX to JS - JSX Transformer / Compiler / Transpiler
/**
* This file is based on the DataFormsJS jsxLoader which is a
* small browser based compiler for JSX / React.
*
* The main file is intended for browser use with a <script> tag
* so needed portions of the code have copied here so that it can
* be optimized with webpack and node using a simple API.
*
* @link https://www.dataformsjs.com
* @link https://github.com/dataformsjs/dataformsjs/blob/master/js/react/jsxLoader.js
@sebastianfdez
sebastianfdez / BTree.js
Last active May 18, 2024 06:33
FINAL COMPLETE BTREE CLASS
export class BTreeNode {
constructor(isLeaf) {
/**
* @type {number[]} list of values in the node
*/
this.values = [];
/**
* @type {boolean} is a leaf
*/
this.leaf = isLeaf;
@Rich-Harris
Rich-Harris / service-workers.md
Last active June 26, 2024 12:04
Stuff I wish I'd known sooner about service workers

Stuff I wish I'd known sooner about service workers

I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.

I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.

Use Canary for development instead of Chrome stable

Chrome 51 has some pretty wild behaviour related to console.log in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.

@shagunsodhani
shagunsodhani / TAO.md
Created February 28, 2016 19:33
Notes on TAO: Facebook’s Distributed Data Store for the Social Graph

TAO

  • Geographically distributed, read-optimized, graph data store.
  • Favors availability and efficiency over consistency.
  • Developed by and used within Facebook (social graph).
  • Link to paper.

Before TAO

  • Facebook's servers directly accessed MySQL to read/write the social graph.
@dschuetz
dschuetz / make_passbook.py
Created May 31, 2014 03:43
Simple hack to create Passbook .pkpass file
import sys, os.path, hashlib, re
import zipfile
import subprocess
from StringIO import StringIO
from io import BytesIO
#
# Passbook Hack
# David Schuetz
# 30 May 2014
@HaiyangXu
HaiyangXu / Server.py
Created May 18, 2014 14:00
A simper python http server can handle mime type properly
# -*- coding: utf-8 -*-
#test on python 3.4 ,python of lower version has different module organization.
import http.server
from http.server import HTTPServer, BaseHTTPRequestHandler
import socketserver
PORT = 8080
Handler = http.server.SimpleHTTPRequestHandler
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active June 28, 2024 10:38
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@willurd
willurd / web-servers.md
Last active June 28, 2024 12:38
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000