View cli.md
$ curl -s -H "X-Something: yeah" localhost:8000 > /dev/null
$ python serv.py
ERROR:root:User-Agent: curl/7.37.1
Host: localhost:8000
Accept: */*
X-Something: yeah
View helloworld.wast
(module
(table 0 anyfunc)
(memory $0 1)
(data (i32.const 12) "d\00\00\00")
(export "memory" (memory $0))
(export "count" (func $count))
(export "add" (func $add))
(func $count (result i32)
(local $0 i32)
(i32.store offset=12
View electron.app.js
const electron = require('electron');
var fs = require('fs'); // To read the directory listing
var path = require('path');
var Buffer = require('buffer').Buffer;
var ipcMain = electron.ipcMain;
// Module to control application life.
const app = electron.app
// Module to create native browser window.
View monaco-editor.component.html
<div id='editor' #editor class="monaco-editor" style="width:800px;height:600px;border:1px solid grey">
View gist:edee8accccdcbb1d3340
This file has been truncated, but you can view the full file.
➜ io.js git:(79dd8f6) ✗ export CC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
➜ io.js git:(79dd8f6) ✗ export CXX=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
➜ io.js git:(79dd8f6) ✗ ./configure --dest-cpu=ia32
creating ./icu_config.gypi
{ 'target_defaults': { 'cflags': [],
'default_configuration': 'Release',
'defines': ['OPENSSL_NO_SSL2=1'],
'include_dirs': [],
'libraries': []},
View gcc-4.9_g++-4.9_osx_10.10
➜ io.js git:(79dd8f6) ✗ export CC="/usr/local/bin/gcc-4.9 -fPIC"
➜ io.js git:(79dd8f6) ✗ export CXX="/usr/local/bin/g++-4.9 -fPIC"
➜ io.js git:(79dd8f6) ✗ export LINK="/usr/local/bin/g++-4.9 -fPIC"
➜ io.js git:(79dd8f6) ✗ ./configure --dest-cpu=ia32
creating ./icu_config.gypi
{ 'target_defaults': { 'cflags': [],
'default_configuration': 'Release',
'defines': ['OPENSSL_NO_SSL2=1'],
'include_dirs': [],
'libraries': []},
View gist:5615eb9e85696422e31a
sudo lldb
(lldb) target create mono
Current executable set to 'mono' (i386).
(lldb) run --debug V8.Net-Console.exe
Process 12784 launched: '/usr/bin/mono' (i386)
warning: (i386) /Library/Frameworks/Mono.framework/Versions/3.10.0/lib/mono/4.5/mscorlib.dll.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
(lldb) c
Creating a V8Engine instance ... Done!
View V8dotnet-return-values.md

#V8dotnet

##Examples

  • How to create a object
  • add it at function argument
  • add it to the global space
  • How to create a function like setTimeout
  • How to create a log function
  • How to access a the function of an object
  • How to pass a parameter to a function of an object.
View TypeScript_Compiler_API.js
// Blog post from Nicholas Wolverson
// http://www.scottlogic.com/blog/2015/01/20/typescript-compiler-api.html
function getCompilerOutput(text) {
host.addFile(dummyScriptName, text);
var output = languageService.getEmitOutput(dummyScriptName).outputFiles;
return output && output.length > 0 ? output[0].text : "";
}
function getMatchingBracePosition(text, pos) {
host.addFile(dummyScriptName, text);
View gist:789d59372e9b41e657d9
public static void CleanupSemanticCache()
{
var ls = v8Engine.GlobalObject.GetProperty("languageService");
var resultHandle = ls.Call("cleanupSemanticCache", null);
}
public static Diagnostic[] GetSyntacticDiagnostics(string fileName)
{
Handle fileNameHandle = v8Engine.CreateValue(fileName);
var ls = v8Engine.GlobalObject.GetProperty("languageService");