Skip to content

Instantly share code, notes, and snippets.


José F. Romaniello jfromaniello

Block or report user

Report or block jfromaniello

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
View example-snapshot.js
var profiler = require('v8-profiler');
process.on('SIGUSR2', () => {
const snapshot = profiler.takeSnapshot();
const fileName = `/tmp/my-project-${}.heapsnapshot`;
.on('finish', () => {
console.log(`snapshot ${fileName} has been stored`);
View example.js
//lets say you want to find the property on the `resp` object
//that contains the url of the request
request.get('', (err, resp, body) => {
console.dir(findMatchingProperty(resp, v => typeof v === 'string' && v.match(/\/foo\/bar/)));
The result is:
jfromaniello / keybindings.json
Created Mar 7, 2018
my keybindings for vscode (similar to sublime)
View keybindings.json
// Place your key bindings in this file to overwrite the defaults
"key": "ctrl+left",
"command": "subwordNavigation.cursorSubwordLeft",
"when": "editorTextFocus"
"key": "ctrl+right",
"command": "subwordNavigation.cursorSubwordRight",
View mdn-object-keys.js
// From
if (!Object.keys) {
Object.keys = (function() {
'use strict';
var hasOwnProperty = Object.prototype.hasOwnProperty,
hasDontEnumBug = !({ toString: null }).propertyIsEnumerable('toString'),
dontEnums = [
# Description:
# Show an image of a sad panda everytime someone use `@channel` to notify every user on a channel.
# Dependencies:
# None
# Configuration:
# None
# Commands:
jfromaniello /
Last active Aug 29, 2015
Turn internet on and off on ubuntu.


sudo curl -o /usr/local/bin/internet-off \

sudo chmod +x /usr/local/bin/internet-off


jfromaniello /
Created Aug 11, 2014
CoreOS template for CloudFormation with two EBS disks on /var/lib/docker

This is a fork from the original CoreOS cloud formation template. It adds two EBS disks of 30G, mounted to /var/lib/docker.

This is intended to be used with an m3.large machine which comes with 30G of SSD.

The reason I add two of 30 and not one of 60 is because a BTRFS limitation.

You can use the "btrfs add" approach in the units to create a BTRFS raid.

jfromaniello /
Last active Aug 29, 2015
Install phantom in ubuntu
#!/usr/bin/env bash
set -e
cd /usr/local/share
curl -Lo $PHANTOM_FILE.tar.bz2$PHANTOM_FILE.tar.bz2
View gist:0afa1325d153030ad960
var foo = {
a: {
b: {
c: 456
function getProp(obj, path) {
return path.split('.').reduce(function (prev, curr) {
You can’t perform that action at this time.