Skip to content

Instantly share code, notes, and snippets.

View sericaia's full-sized avatar

Daniela Borges Matos de Carvalho sericaia

View GitHub Profile
@sericaia
sericaia / hapi-server-ext-route-validation
Created March 27, 2015 09:49
Playing with hapi server.ext
var Hapi = require('hapi');
var server = new Hapi.Server();
server.connection({
host: 'localhost',
port: 8000
});
server.ext('onRequest', function (request, reply) {
----------------------------------------------------------------------
NES HAPIJS
Thor: version: 1.0.0
God of Thunder, son of Odin and smasher of WebSockets!
@sericaia
sericaia / perf-flame-graph-notes.md
Created February 8, 2016 23:41 — forked from trevnorris/perf-flame-graph-notes.md
Quick steps of how to create a flame graph using perf

The prep-script.sh will setup the latest Node and install the latest perf version on your Linux box.

When you want to generate the flame graph, run the following (folder locations taken from install script):

sudo sysctl kernel.kptr_restrict=0
# May also have to do the following:
# (additional reading http://unix.stackexchange.com/questions/14227/do-i-need-root-admin-permissions-to-run-userspace-perf-tool-perf-events-ar )
sudo sysctl kernel.perf_event_paranoid=0
@sericaia
sericaia / admin.js
Created February 23, 2016 21:37 — forked from tdantas/admin.js
//path: plugins/admin.js
const plugin = module.exports;
plugin.register = register;
plugin.register.attributes = {
name: 'admin plugin',
version: '0.0.1-alpha-beta-gama'
};
@sericaia
sericaia / index.js
Created April 8, 2016 16:29 — forked from gaearon/index.js
Breaking out of Redux paradigm to isolate apps
import React, { Component } from 'react'
import Subapp from './subapp/Root'
class BigApp extends Component {
render() {
return (
<div>
<Subapp />
<Subapp />
<Subapp />
@sericaia
sericaia / pick.js
Created February 16, 2017 10:55 — forked from johnytiago/pick.js
Pick a random require-lx attendee for prize winner
const request = require('request')
let options = {
url: 'https://api.meetup.com/require-lx/events/236789439/rsvps'
}
request(options, (err, res, body ) => {
if (err) {
throw err;
}

Keybase proof

I hereby claim:

  • I am sericaia on github.
  • I am danielayld (https://keybase.io/danielayld) on keybase.
  • I have a public key whose fingerprint is AE48 38D9 79A7 4F4C 5B14 D834 3BB9 87EA 8530 5B4E

To claim this, I am signing this object: