⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
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
// Load the TCP Library | |
net = require('net'); | |
// Keep track of the chat clients | |
var clients = []; | |
// Start a TCP Server | |
net.createServer(function (socket) { | |
// Identify this client |
This is a barebones GYP file to compile 1 C source file. We are demonstrating that the cflags
parameter in gyp files gets completely ignored :(
$ ../gyp/gyp -f make --depth=. hello.gyp
$ V=1 make
cc -fasm-blocks -mpascal-strings -Os -gdwarf-2 -MMD -MF out/Default/.deps/out/Default/obj.target/hello/hello.o.d.raw -c -o out/Default/obj.target/hello/hello.o hello.c
./gyp-mac-tool flock out/Default/linker.lock g++ -Lout/Default -o "out/Default/hello" out/Default/obj.target/hello/hello.o
LINK(target) out/Default/hello: Finished
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
### | |
#Step 1 - Generate server certificates etc... (most of this code is horribly ripped off from nodejs docs currently -> http://nodejs.org/docs/latest/api/tls.html) | |
### | |
#Assuming your starting from a clean directory | |
mkdir server | |
cd server | |
#generate private key |
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 "SSLBuffer.h" | |
SSLBuffer::SSLBuffer() | |
:ssl(NULL) | |
,read_bio(NULL) | |
,write_bio(NULL) | |
,write_to_socket_callback(NULL) | |
,write_to_socket_callback_data(NULL) | |
,read_decrypted_callback(NULL) | |
,read_decrypted_callback_data(NULL) |
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
def receive(co) | |
let status, val = coroutine.resume(co) | |
return val | |
end | |
def send(x) | |
coroutine.yield(x) | |
end |
by Keith Rosenberg (netpoetica)
Note: do this in some sort of project/ directory that makes sense. depot_tools are going to need to be in your path, so you may want to install them somewhere you are comfortable with.
git clone https://github.com/v8/v8.git
OlderNewer