Skip to content

Instantly share code, notes, and snippets.

View nchlswhttkr's full-sized avatar
:shipit:
I ship it

Nicholas Whittaker nchlswhttkr

:shipit:
I ship it
View GitHub Profile
@nikcub
nikcub / README.md
Created October 4, 2012 13:06
Facebook PHP Source Code from August 2007
@guilherme
guilherme / gist:9604324
Last active May 5, 2024 03:17
Git pre-commit hook that detects if the developer forget to remove all the javascript console.log before commit.
#!/bin/sh
# Redirect output to stderr.
exec 1>&2
# enable user input
exec < /dev/tty
consoleregexp='console.log'
# CHECK
if test $(git diff --cached | grep $consoleregexp | wc -l) != 0
then
@atoponce
atoponce / gist:07d8d4c833873be2f68c34f9afc5a78a
Last active March 19, 2024 17:24 — forked from tqbf/gist:be58d2d39690c3b366ad
Cryptographic Best Practices

Cryptographic Best Practices

Putting cryptographic primitives together is a lot like putting a jigsaw puzzle together, where all the pieces are cut exactly the same way, but there is only one correct solution. Thankfully, there are some projects out there that are working hard to make sure developers are getting it right.

The following advice comes from years of research from leading security researchers, developers, and cryptographers. This Gist was [forked from Thomas Ptacek's Gist][1] to be more readable. Additions have been added from

@muhammadghazali
muhammadghazali / What is server_names_hash_bucket_size.md
Last active February 9, 2024 14:13
Nginx: What is server_names_hash_bucket_size?

Background

While I'm learning how to use Nginx, I was instructed to update the server_names_hash_bucket_size (/etc/nginx/nginx.conf) value from 32 to 64, but I don't understand why should I increase the value to 64.

References

References that have been read so far:

@fzaninotto
fzaninotto / material-ui-10-migration-feedback.md
Created November 8, 2017 21:10
Feedback from migrating a material-ui app to 1.0

I have migrated about 11 kloc from material-ui 0.X to material ui 1.0 (a moderate size project). It has taken me more than 20 hours, and it was not a pleasant experience. cf https://github.com/marmelab/admin-on-rest/pull/1167

No Migration Path

I understand that you took the opportunity of a major BC break to rethink the API completely. But coming from 0.X, the changes often aren't consistent. Each component has changed in a different way, and for a given component, there is no way to guess the 1.0 API based on the 0.x API. Why did <ToolbarGroup> disappear? Why do I need to decompose a ListItem into so many sub components now? Why was Toggle renamed to Switch?

@swalkinshaw
swalkinshaw / tutorial.md
Last active November 13, 2023 08:40
Designing a GraphQL API
@Noxville
Noxville / 3958810354.log (open qualifiers 'CY6IXXCY6IXX')
Last active June 23, 2018 00:48
Various activations and deactivations of Atun's Armlet.
[00:25:11.086] npc_dota_hero_legion_commander uses item_armlet
[00:25:20.117] npc_dota_hero_legion_commander uses item_armlet
[00:25:25.449] npc_dota_hero_legion_commander uses item_armlet
[00:25:32.414] npc_dota_hero_legion_commander uses item_armlet
[00:25:37.246] npc_dota_hero_legion_commander uses item_armlet
[00:25:42.978] npc_dota_hero_legion_commander uses item_armlet
[00:25:51.842] npc_dota_hero_legion_commander uses item_armlet
[00:25:55.675] npc_dota_hero_legion_commander uses item_armlet
[00:26:04.139] npc_dota_hero_legion_commander uses item_armlet
[00:26:11.237] npc_dota_hero_legion_commander uses item_armlet
//
// Author: Jonathan Blow
// Version: 1
// Date: 31 August, 2018
//
// This code is released under the MIT license, which you can find at
//
// https://opensource.org/licenses/MIT
//
//
@bvaughn
bvaughn / index.md
Last active April 3, 2024 07:41
Interaction tracing with React

This API was removed in React 17


Interaction tracing with React

React recently introduced an experimental profiler API. After discussing this API with several teams at Facebook, one common piece of feedback was that the performance information would be more useful if it could be associated with the events that caused the application to render (e.g. button click, XHR response). Tracing these events (or "interactions") would enable more powerful tooling to be built around the timing information, capable of answering questions like "What caused this really slow commit?" or "How long does it typically take for this interaction to update the DOM?".

With version 16.4.3, React added experimental support for this tracing by way of a new NPM package, scheduler. However the public API for this package is not yet finalized and will likely change with upcoming minor releases, so it should be used with caution.

@bvaughn
bvaughn / index.md
Last active May 4, 2024 11:25
How to use profiling in production mode for react-dom

React recently introduced an experimental profiler API. This page gives instructions on how to use this API in a production release of your app.

Table of Contents

Profiling in production

React DOM automatically supports profiling in development mode for v16.5+, but since profiling adds some small additional overhead it is opt-in for production mode. This gist explains how to opt-in.