This instructions allow you to take periodical heapdumps.
To use in your project, first install heapdump, then add the following code to your app just after requiring 'fs'.
| 'use strict'; | |
| var | |
| LIVERELOAD_PORT = 35729, | |
| lrSnippet = require('connect-livereload')({ port: LIVERELOAD_PORT }), | |
| mountFolder = function( connect, dir ) { | |
| return connect.static(require('path').resolve(dir)); | |
| }; | |
| module.exports = function( grunt ) { |
| /* Flatten das boostrap */ | |
| .well, .navbar-inner, .popover, .btn, .tooltip, input, select, textarea, pre, .progress, .modal, .add-on, .alert, .table-bordered, .nav>.active>a, .dropdown-menu, .tooltip-inner, .badge, .label, .img-polaroid { | |
| -moz-box-shadow: none !important; | |
| -webkit-box-shadow: none !important; | |
| box-shadow: none !important; | |
| -webkit-border-radius: 0px !important; | |
| -moz-border-radius: 0px !important; | |
| border-radius: 0px !important; | |
| border-collapse: collapse !important; | |
| background-image: none !important; |
| #!/bin/sh | |
| # Simple watch tool | |
| # Homepage https://gist.github.com/epeli/5233969/ | |
| # Deps: | |
| # sudo apt-get install inotify-tools | |
| COMMAND=$@ |
This instructions allow you to take periodical heapdumps.
To use in your project, first install heapdump, then add the following code to your app just after requiring 'fs'.
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(clock_timestamp(), query_start), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
| <widget type="blurbs"> | |
| <arg id="type">...</arg> | |
| <arg id="group">...</arg> | |
| <arg id="format"><div class="lw_blurbs_title">{title}</div><div class="lw_blurbs_body">{body}</div></arg> | |
| <arg id="class">tabbed</arg> | |
| </widget> |
| var fs = require("fs") | |
| var ssl_options = { | |
| key: fs.readFileSync('privatekey.pem'), | |
| cert: fs.readFileSync('certificate.pem') | |
| }; | |
| var port = process.env.PORT || 3000; | |
| var express = require('express'); | |
| var ejs = require('ejs'); | |
| var passport = require('passport') |
| %define ver 0.6.6 | |
| %define rel 1 | |
| %define jobs 2 | |
| Name: nodejs | |
| Version: %{ver} | |
| Release: %{rel} | |
| Summary: Node's goal is to provide an easy way to build scalable network programs. | |
| Group: Applications/Internet | |
| License: Copyright Joyent, Inc. and other Node contributors. |
| # Author: Pieter Noordhuis | |
| # Description: Simple demo to showcase Redis PubSub with EventMachine | |
| # | |
| # Update 7 Oct 2010: | |
| # - This example does *not* appear to work with Chrome >=6.0. Apparently, | |
| # the WebSocket protocol implementation in the cramp gem does not work | |
| # well with Chrome's (newer) WebSocket implementation. | |
| # | |
| # Requirements: | |
| # - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby |
| #! /bin/sh | |
| ### BEGIN INIT INFO | |
| # Provides: redis-server | |
| # Required-Start: $syslog | |
| # Required-Stop: $syslog | |
| # Should-Start: $local_fs | |
| # Should-Stop: $local_fs | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: redis-server - Persistent key-value db |