Skip to content

Instantly share code, notes, and snippets.


Julien Gilli misterdjules

View GitHub Profile
View changes-prof-process.txt
nfml-jgilliXAH:find-my-way jgilli$ node --prof-process isolate-0x103802400-v8.log
Code move event for unknown code: 0x30fac5d4de20
Code move event for unknown code: 0x30fac5d5d2f8
Statistical profiling result from isolate-0x103802400-v8.log, (61379 ticks, 1220 unaccounted, 0 excluded).
[Shared libraries]:
ticks total nonlib name
1916 3.1% /usr/lib/system/libsystem_platform.dylib
321 0.5% /usr/lib/system/libsystem_pthread.dylib
211 0.3% /usr/lib/system/libsystem_malloc.dylib

Challenges in using post-mortem debugging with async/await


async/await is a new feature of the EcmaScript programming language that combines generators and promises to improve the language-level model for writing asynchronous code.

It is currently in "stage 3" of the TC39 process, which means it's a "candidate" that needs more implementation experience.


Challenges in using post-mortem debugging with generators


Generators were introduced in EcmaScript 2015. They provide a way to iterate over a set of values that are produced by a generating function.

Here's an example of how to use a generator:

function* myGenerator() {
View event-ports-example.c
* fen.c
* cc fen.c -o fen
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
View zapi-793-questions.txt
The original goal of this ticket was to handle the case when a volume would
unexpectedly change its IP address on its existing network due to, e.g. operator
changes, migration or bugs.
The first implementation that has been tried at updates the
{{internal_metadata}} of VMs that mount a given volume during their {{start}}
workflow and update the IP address of any volume that they require.
While this solves part of the original use case, it has the fundamental
View get-filters-breakdown.js
var assert = require('assert-plus');
var fs = require('fs');
var https = require('https');
var url = require('url');
var util = require('util');
var vasync = require('vasync');
var XML = require('xml-simple');
View mg-try-older-releases.diff
➜ mountain-gorilla git:(master) ✗ git diff | cat
diff --git a/configure b/configure
index 9556013..eae0c94 100755
--- a/configure
+++ b/configure
@@ -283,39 +283,53 @@ function preload_bits_from_manta() {
# of the actual latest path. Something similar but with a "-<buildstamp>"
# instead of "-latest" and we'll grab that into latest_dir.
- local count=0
View cloudapi.diff
diff --git a/lib/machines.js b/lib/machines.js
index 1ae8960..681acc7 100644
--- a/lib/machines.js
+++ b/lib/machines.js
@@ -271,7 +271,7 @@ function getListOptions(req) {
switch (req.params.type) {
case 'smartmachine':
- opts.predicate = '{ "and" [ ' +
+ opts.predicate = '{ "and": [ ' +
View node-sdc-clients.diff
diff --git a/test/cnapi.test.js b/test/cnapi.test.js
index 6c67a44..169b7bc 100644
--- a/test/cnapi.test.js
+++ b/test/cnapi.test.js
@@ -8,10 +8,12 @@
* Copyright (c) 2018, Joyent, Inc.
+var assert = require('assert-plus');
var bunyan = require('bunyan');
View gist:0672130d3ed47554a1821dc5098be75c
[2018-02-14T22:47:19.646Z] WARN: muskie/27560 on 56564894-a7c2-470e-a218-3d859e7e1687: mako: connection failed (req_id=95747e03-ec42-4075-9721-317822b609c3, method=GET, path=/Joyent_Dev/public/builds/reg
istrar/master-latest, shark="[object SharkClient<>]")
PoolFailedError: Pool 15b224b9-30d0-4214-8cf1-3fb68d8caa55 ( has failed and cannot take new requests.
at Object._onImmediate (/opt/smartdc/muskie/node_modules/cueball/lib/pool.js:752:8)
at processImmediate [as _immediateCallback] (timers.js:363:15)
[2018-02-14T22:47:19.648Z] WARN: muskie/27560 on 56564894-a7c2-470e-a218-3d859e7e1687: request failed: internal error (req_id=95747e03-ec42-4075-9721-317822b609c3, method=GET, path=/Joyent_Dev/public/bui
InternalError: an unexpected error occurred
at translateError (/opt/smartdc/muskie/lib/errors.js:681:13)
at ServerResponse.formatJSON (/opt/smartdc/muskie/lib/server.js:51:16)
You can’t perform that action at this time.