Skip to content

Instantly share code, notes, and snippets.

📈
bigger on the inside

C J Silverio ceejbot

📈
bigger on the inside
Block or report user

Report or block ceejbot

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ceejbot
ceejbot / esm_use_cases.md
Last active Apr 3, 2018
ESModule use cases, a list in progress
View esm_use_cases.md

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 / esm_in_node_proposal.md
Last active Jul 17, 2019
npm's proposal for supporting ES modules in node
View esm_in_node_proposal.md

ESM modules in node: npm edition

The proposal you’re about to read is not just a proposal. We have a working implementation of almost everything we discussed here. We encourage you to checkout and build our branch: our fork, with the relevant branch selected. Building and using the implementation will give you a better understanding of what using it as a developer is like.

Our implementation ended up differing from the proposal on some minor points. As our last action item before making a PR, we’re writing documentation on what we did. While I loathe pointing to tests in lieu of documentation, they will be helpful until we complete writing docs: the unit tests.

This repo also contains a bundled version of npm that has a new command, asset. You can read the documentation for and goals of that comma

@ceejbot
ceejbot / 2017-05-21T03_09_46_674Z-debug.log
Created May 21, 2017
enoent on man page symlink?????
View 2017-05-21T03_09_46_674Z-debug.log
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 / README.md
Last active Apr 7, 2017
How I set up a mastodon instance on AWS with ansible on ubuntu trusty
View README.md
@ceejbot
ceejbot / curl-test.shell
Created Jul 6, 2016
Curling a file with a negative mtime
View curl-test.shell
$ 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
View uselessd.md

uselessd :: information system Edit RecentChanges Preferences Discussion logo

uselessd -- what it says on the tin, plus a complementary kitchen sink and flat tire

So, what is it?

uselessd (the useless daemon, or the daemon that uses less... depending on your viewpoint) is a project which aims to reduce systemd to a base initd, process supervisor and transactional dependency system, while minimizing intrusiveness and isolationism. Basically, it’s systemd with the superfluous stuff cut out, a (relatively) coherent idea of what it wants to be, support for non-glibc platforms and an approach that aims to minimize complicated design.

@ceejbot
ceejbot / proposal.md
Last active Nov 25, 2015
monitoring proposal
View proposal.md

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

@ceejbot
ceejbot / monitoring.md
Last active Nov 17, 2018
monitoring manifesto
View monitoring.md

monitoring: what I want

I've recently shifted from a straight engineering job to a job with a "dev/ops" title. What I have discovered in operations land depresses me. The shoemaker's children are going unshod. Operations software is terrible.

What's driving me craziest right now is my monitoring system.

what I have right now

What I have right now is Nagios.

@ceejbot
ceejbot / gist:11231518
Last active Aug 29, 2015
installations of mime-1.2.11.tgz at 18:59
View gist:11231518
[root@npm-lylog-1 /var/svc/log]# grep mime site-npm-lylog\:default.log.1 | grep "1.2.11" | grep 18:59
2014-04-23T18:59:00Z 71.185.69.210 "-" "GET /npm/public/registry/mime/_attachments/mime-1.2.11.tgz" 200 "node/v0.10.26 darwin x64" "HIT" "aws_" "cache-v42-ASH"
2014-04-23T18:59:00Z 66.151.247.12 "-" "GET /mime/1.2.11" 304 "node/v0.10.26 win32 x64" "HIT" "shield__cache_c31_CHI__chi_il_us" "cache-c31-CHI"
2014-04-23T18:59:00Z 66.151.247.12 "-" "GET /mime/1.2.11" 304 "node/v0.10.26 win32 x64" "HIT" "shield__cache_v36_ASH__ashburn_va_us" "cache-v36-ASH"
2014-04-23T18:59:00Z 8.12.41.197 "-" "GET /mime/1.2.11" 304 "node/v0.10.26 sunos x64" "HIT" "shield__cache_lax1430_LAX__lax_ca_us" "cache-lax1430-LAX"
2014-04-23T18:59:00Z 8.12.41.197 "-" "GET /mime/1.2.11" 304 "node/v0.10.26 sunos x64" "HIT" "shield__cache_v41_ASH__ashburn_va_us" "cache-v41-ASH"
2014-04-23T18:59:03Z 222.127.159.33 "-" "GET /npm/public/registry/mime/_attachments/mime-1.2.11.tgz" 200 "node/v0.10.26 win32 ia32" "HIT" "aws_" "cache-hk93-HKG"
2014-04-
@ceejbot
ceejbot / strace_example
Created Apr 2, 2014
output of `strace ls`
View strace_example
ubuntu@ip-172-31-40-117:~$ strace ls
execve("/bin/ls", ["ls"], [/* 19 vars */]) = 0
brk(0) = 0x67c000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f525ac75000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=22763, ...}) = 0
mmap(NULL, 22763, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f525ac6f000
close(3) = 0
You can’t perform that action at this time.