Skip to content

Instantly share code, notes, and snippets.

View ffffranklin's full-sized avatar

Franklin Clark ffffranklin

View GitHub Profile
@ffffranklin
ffffranklin / README.md
Created December 2, 2021 21:47 — forked from anthonysimone/README.md
How a Browser Works

How a Browser Works

   

   

Diagram

My thoughts on writing tiny reusable modules that each do just one
thing. These notes were adapted from an email I recently sent.
***
If some component is reusable enough to be a module then the
maintenance gains are really worth the overhead of making a new
project with separate tests and docs. Splitting out a reusable
component might take 5 or 10 minutes to set up all the package
overhead but it's much easier to test and document a piece that is
@ffffranklin
ffffranklin / pre-commit
Created August 3, 2018 21:00 — forked from kuy/pre-commit
git: pre-commit hook script to prevent committing FIXME code
#!/bin/sh
matches=$(git diff --cached | grep -E '\+.*?FIXME')
if [ "$matches" != "" ]
then
echo "'FIXME' tag is detected."
echo "Please fix it before committing."
echo " ${matches}"
exit 1
@ffffranklin
ffffranklin / index.html
Last active January 23, 2016 01:06 — forked from anonymous/index.html
JS Bin// source https://jsbin.com/kecokok
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-3.0.0-alpha1.js"></script>
<script src="https://cdn.jsdelivr.net/momentjs/2.10.6/moment-with-locales.min.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
.day {
@ffffranklin
ffffranklin / succ.js
Last active October 10, 2015 02:29 — forked from devongovett/succ.js
An implementation of Ruby's string.succ method in JavaScript
/*
* An implementation of Ruby's string.succ method.
* By Devon Govett
*
* Returns the successor to str. The successor is calculated by incrementing characters starting
* from the rightmost alphanumeric (or the rightmost character if there are no alphanumerics) in the
* string. Incrementing a digit always results in another digit, and incrementing a letter results in
* another letter of the same case.
*
* If the increment generates a carry, the character to the left of it is incremented. This
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Updated: 2010/12/05
// License: MIT
//
// Copyright (c) 2010-2013 Diego Perini (http://www.iport.it)
//
// Permission is hereby granted, free of charge, to any person