This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$browserlingTunnelPort = 59374; | |
$browserlingTunnelUrl = "http://tunnel.browserling.com:" . $browserlingTunnelPort . "/WordPress/TestingWp/"; | |
if ($_SERVER['REMOTE_ADDR'] != '127.0.0.1') { | |
define('WP_SITEURL', $browserlingTunnelUrl); | |
define('WP_HOME', $browserlingTunnelUrl); | |
update_option('siteurl', $browserlingTunnelUrl); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[daemons] | |
; enable SSL support by uncommenting the following line and supply the PEM's below. | |
; the default ssl port CouchDB listens on is 6984 | |
; httpsd = {couch_httpd, start_link, [https]} | |
compaction_daemon={couch_compaction_daemon, start_link, []} | |
[compaction_daemon] | |
; The delay, in seconds, between each check for which database and view indexes | |
; need to be compacted. | |
check_interval = 300 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iptables.list('Tunnels', function (rules) { | |
var ports = {}; | |
rules.forEach(function (rule) { | |
if (rule.parsed.target == 'REJECT') return; | |
// extract tcp destination ports | |
var match = rule.raw.match(/tcp dpt:(\d+)/); | |
if (match) { | |
ports[parseInt(match[1])] = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use warnings; | |
use strict; | |
use Text::CSV; | |
use constant { | |
ID => 0, | |
TYPE => 1, | |
SOURCE => 2, | |
AMOUNT => 3, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unsigned char * | |
rgba_to_rgb(unsigned char *rgba, int rgba_size) | |
{ | |
int rgb_size = rgba_size/4*3; | |
unsigned char *rgb = malloc(sizeof(unsigned char)*rgb_size); | |
if (!rgb) return NULL; | |
int i, j; | |
for (i=0,j=0;i<rgba_size;i+=4,j+=3) { | |
rgb[j] = *(rgba+i); | |
rgb[j+1] = *(rgba+i+1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node> o = { foo : 'bar' } | |
{ foo: 'bar' } | |
node> Object.defineProperty(o, 'moo', { value : 'cows', enumerable: false }) | |
{ foo: 'bar' } | |
node> Object.keys(o) | |
[ 'foo' ] | |
node> o.moo | |
'cows' | |
node> Object.getOwnPropertyDescriptor(o, 'moo') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
trap 'echo; echo Aborting; exit 1' 2 | |
for module in node-{video,png,jpeg,base64} | |
do | |
( | |
cd $module | |
rm -rf build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// annoyingly many browsers don't have these: | |
if (!Object.keys) Object.keys = function (obj) { | |
var keys = []; | |
for (var key in obj) { | |
if (obj.hasOwnProperty(key)) { | |
keys.push(key); | |
} | |
} | |
return keys; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hi Dionysios. | |
Thanks for the questions. My answers appear after each of the questions. | |
On Thu, Jul 22, 2010 at 10:55 AM, Dionysios G. Synodinos <synodinos@infoq.com> wrote: | |
Hi Peter, | |
My name is Dionysios Synodinos, I'm an editor for InfoQ and since we're doing an article on Node.js, we'd love to have your feedback. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdlib> | |
#include <node.h> | |
#include <node_buffer.h> | |
using namespace v8; | |
using namespace node; | |
class RetBuf : public ObjectWrap { | |
public: | |
RetBuf() {} |
OlderNewer