Skip to content

Instantly share code, notes, and snippets.

View ceejbot's full-sized avatar
📈
bigger on the inside

C J Silverio ceejbot

📈
bigger on the inside
View GitHub Profile
@ceejbot
ceejbot / 1_problem.js
Created August 24, 2012 04:32
An error-handling pattern for node.js
function functionThatMightThrow(input)
{
return JSON.parse(input);
}
function putTogetherSomeData(input, callback)
{
var result = {};
redis.get(input, function(err, reply)
@ceejbot
ceejbot / proposal.md
Last active November 25, 2015 21:13
monitoring proposal

Go here for the latest + some code.

numbat

An alerting engine for a metrics & monitoring system.

This is the same approach I wanted in my initial spike, only instead of writing a custom collector & using an existing alerting engine (riemann), I'm proposing using an existing collector (hekad) and writing the alerting engine.

The system

team-cave-newt:master* λ node camera.js
640
368
7.982560051722453e+83
640
368
2.516806656184071e+253
640
368
2.529804685642898e+79
@ceejbot
ceejbot / nodebots_todo.md
Last active December 23, 2015 03:48
Things to do for nodebots day
  1. Party rentals from here: ASERentals. Arrange on Monday if possible.
  2. Bottled water in quantity.
  3. Canned soda in quantity.
  4. Large plastic buckets for drinks.
  5. DAY BEFORE: Mail to all attendees with directions from 101 & suggestions for what to bring.
  6. DAY OF: Ice in bags. Maybe beer.
  7. DAY OF: Bring all your toys.
  8. DAY OF: Taco order mid-morning.
@ceejbot
ceejbot / curl-test.shell
Created July 6, 2016 21:44
Curling a file with a negative mtime
$ touch -t 196508231405.14 ./test.tgz"
$ stat ./test.tgz
File: ‘test.tgz’
Size: 6012 Blocks: 16 IO Block: 4096 regular file
Device: 900h/2304d Inode: 127402426 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 1000/ ubuntu) Gid: ( 1000/ ubuntu)
Access: 1965-08-23 14:05:14.000000000 +0000
Modify: 1965-08-23 14:05:14.000000000 +0000
Change: 2016-07-06 17:35:26.871223783 +0000
@ceejbot
ceejbot / 2017-05-21T03_09_46_674Z-debug.log
Created May 21, 2017 15:34
enoent on man page symlink?????
2001 silly decomposeActions build combined-stream@1.0.5
2002 silly decomposeActions install combined-stream@1.0.5
2003 silly decomposeActions postinstall combined-stream@1.0.5
2004 silly decomposeActions finalize combined-stream@1.0.5
2005 silly decomposeActions refresh-package-json combined-stream@1.0.5
2006 silly decomposeActions fetch commander@2.9.0
2007 silly decomposeActions extract commander@2.9.0
2008 silly decomposeActions preinstall commander@2.9.0
2009 silly decomposeActions build commander@2.9.0
2010 silly decomposeActions install commander@2.9.0
@ceejbot
ceejbot / esm_use_cases.md
Last active April 3, 2018 04:21
ESModule use cases, a list in progress

ES module use cases

  • Alice is writing a new library, and she is excited to use the new ES6 syntax. However, she would like to use an older but still good package she found on npm, that exports its interface using CommonJS. She does so easily after reading the NodeJS documentation on how to do this.

  • Bob is updating a module for his work, and he needs to support existing CommonJS-using codebases as well as a new project that prefers to stick with ES6 for static analysis reasons. He publishes a package that exports both kinds of interfaces.

  • Carol is updating her popular code coverage reporting tool for the new world. She uses the ESM loader hooks to instrument test code as it is imported so she can get code coverage reporting on par with what she has for CommonJS.

  • David is writing a transpiler. He writes a custom hook that transpiles source as it's loaded from his language to JavaScript.

@ceejbot
ceejbot / stashwoes.md
Last active March 14, 2019 02:57
A summary of things I miss about Github when I use Stash.

What I miss about github

See this Cloudup stream for visual references.

The short answer is that I miss everything. There is no comparing the two projects. Stash's feature set is a shadow of Github's.

What a project looks like on Github:

What a project looks like on Github

@ceejbot
ceejbot / 2020-01-16-notes.md
Created January 17, 2020 05:22
notes from pairing session 2020/01/16 Chris & CJ

notes from pairing session 2020/01/16 Chris & CJ

What is a signature in entropic?

  • chris wants a binary format
  • we have to hash it
  • order matters
  • let's get fussy

All objects start with type, expressed as a string.

@ceejbot
ceejbot / ceej-vortex-modlist.json
Last active March 28, 2020 22:36
All mods I have installed via Nexus Vortex, in json format. Restore the list with this extension: https://github.com/Garethp/Vortex-Modlist-Backup
[
{
"name": "Vurts Ascadian Isles Trees Replacer II",
"game": "morrowind",
"modId": 37249,
"fileId": 76153
},
{
"name": "HQ Weapons",
"game": "morrowind",