Clone and build Node for analysis:
$ git clone https://github.com/joyent/node.git
$ cd node
$ export GYP_DEFINES="v8_enable_disassembler=1"
$ ./configure
$ make -j4
#!/bin/bash | |
# roles/openssl/files/install.sh | |
wget https://www.openssl.org/source/openssl-1.0.1g.tar.gz -O /tmp/openssl-1.0.1g.tar.gz | |
cd /tmp | |
tar -xvzf openssl-1.0.1g.tar.gz | |
cd openssl-1.0.1g |
file_roots: | |
base: | |
- /srv/salt/default_states | |
- /srv/salt/aws_stuff | |
vagrant: | |
- /srv/salt/default_states | |
Then place your aws specific custom grains in /srv/salt/aws_stuff/_grains |
# Description: | |
# Display a random tweet from loudbot if someone YELLS in chat | |
# | |
# Dependencies: | |
# "ntwitter" : "https://github.com/sebhildebrandt/ntwitter/tarball/master", | |
# | |
# Configuration: | |
# HUBOT_TWITTER_CONSUMER_KEY | |
# HUBOT_TWITTER_CONSUMER_SECRET | |
# HUBOT_TWITTER_ACCESS_TOKEN_KEY |
var http = require('http'); | |
var send = require('send'); | |
var urlParse = require('url').parse; | |
var count = 2; | |
var server = http.createServer(function (req, res) { | |
if (!--count) server.close(); // Only allow two connection and then exit. | |
send(req, urlParse(req.url).pathname) | |
.root(__dirname) | |
.pipe(res); |
# Bind SSL port with PFS-enabling cipher suite | |
bind :443 ssl crt path_to_certificate no-tls-tickets ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-GCM-SHA384:AES128-SHA256:AES128-SHA:AES256-SHA256:AES256-SHA:!MD5:!aNULL:!DH:!RC4 | |
# Distinguish between secure and insecure requests | |
acl secure dst_port eq 443 | |
# Mark all cookies as secure if sent over SSL | |
rsprep ^Set-Cookie:\ (.*) Set-Cookie:\ \1;\ Secure if secure | |
# Add the HSTS header with a 1 year max-age |
#!/bin/bash | |
FAIL=0 | |
echo "starting" | |
./sleeper 2 0 & | |
./sleeper 2 1 & | |
./sleeper 3 0 & | |
./sleeper 2 0 & |
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
#!/usr/bin/env bash | |
size=1024 # MB | |
mount_point=$HOME/tmp | |
name=$(basename "$mount_point") | |
usage() { | |
echo "usage: $(basename "$0") [mount | umount | remount | check | orphan]" \ | |
"(default: mount)" >&2 | |
} |