Skip to content

Instantly share code, notes, and snippets.

View chriseckhardt's full-sized avatar

Christopher Eckhardt chriseckhardt

View GitHub Profile

Netflix JavaScript Talks - Debugging Node.js in Production

Notes from https://www.youtube.com/watch?v=O1YP8QP9gLA

"Let's work the problem, people. Let's not make things any worse by guessing."

Apply the Scientific Method

  1. Construct Hypothesis of what's happening
  2. Collect data
  3. Analyze data and draw a conclusion
@Rich-Harris
Rich-Harris / footgun.md
Last active June 16, 2024 00:01
Top-level `await` is a footgun

Edit — February 2019

This gist had a far larger impact than I imagined it would, and apparently people are still finding it, so a quick update:

  • TC39 is currently moving forward with a slightly different version of TLA, referred to as 'variant B', in which a module with TLA doesn't block sibling execution. This vastly reduces the danger of parallelizable work happening in serial and thereby delaying startup, which was the concern that motivated me to write this gist
  • In the wild, we're seeing (async main(){...}()) as a substitute for TLA. This completely eliminates the blocking problem (yay!) but it's less powerful, and harder to statically analyse (boo). In other words the lack of TLA is causing real problems
  • Therefore, a version of TLA that solves the original issue is a valuable addition to the language, and I'm in full support of the current proposal, which you can read here.

I'll leave the rest of this document unedited, for archaeological

@baweaver
baweaver / sinatra_0x0dea.rb
Last active July 28, 2017 16:52
It happened again with Sinatra this time
# Oh dear god why
___ = (
_ = ' ' =~ /$/ # 10 - apparently EOL match works like that on spaces
) *
_ + # * 10 -> 100
_ + # + 10 -> 110
_ / # + 10 /
(
(__=$$/$$) + # 1
#!/bin/bash
#
# Swap/Roll a file handle between processes.
#
# Posted at https://groups.google.com/forum/#!topic/alt.hackers/0ZMsMc5DvUw
#
# Usage:
#
# fdswap.sh <old logfile> <new logfile> [optional pids]
# fdswap.sh /var/log/logfile /tmp/logfile [pids]
@lukaszx0
lukaszx0 / README.md
Last active August 29, 2015 14:21
kwargs polyfill

kwargs

This is a simple hash extension which imitates behaviour of ruby's 2.1 keyword arguments. Check out examples below and spec file for sample usage.

Examples

Required args

def foobar(args = {})
@fernandoaleman
fernandoaleman / gist:5083680
Last active October 17, 2023 12:02
How to update VirtualBox Guest Additions with vagrant
# Start the old vagrant
$ vagrant init centos-6.3
$ vagrant up
# You should see a message like:
# [default] The guest additions on this VM do not match the install version of
# VirtualBox! This may cause things such as forwarded ports, shared
# folders, and more to not work properly. If any of those things fail on
# this machine, please update the guest additions and repackage the
# box.
@misterbrownlee
misterbrownlee / jenkins-notes.md
Created September 12, 2012 18:10
Jenkins setup

I just had to set up Jenkins to use GitHub. My notes (to myself, mostly):

Detailed Instructions

For setting up Jenkins to build GitHub projects. This assumes some ability to manage Jenkins, use the command line, set up a utility LDAP account, etc. Please share or improve this Gist as needed.

Install Jenkins Plugins