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
#ifndef _GET_SYMBOL_FROM_CURRENT_PROCESS_H | |
#define _GET_SYMBOL_FROM_CURRENT_PROCESS_H | |
#include <assert.h> | |
#ifdef _WIN32 | |
#include <windows.h> | |
#else | |
#include <dlfcn.h> | |
#endif |
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
{ | |
"targets": [ | |
{ | |
"target_name": "json", | |
"cflags!": [ "-fno-exceptions" ], | |
"cflags_cc!": [ "-fno-exceptions" ], | |
"sources": [ "json.cc" ], | |
"include_dirs": [ | |
"<!@(node -p \"require('node-addon-api').include\")" | |
], |
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
{ | |
"targets": [ | |
{ | |
"target_name": "hello", | |
"sources": [ "hello.cc" ] | |
} | |
] | |
} |
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
# This file inherits default targets for Node addons, see https://github.com/nodejs/node-gyp/blob/master/addon.gypi | |
{ | |
# https://github.com/springmeyer/gyp/blob/master/test/make_global_settings/wrapper/wrapper.gyp | |
'make_global_settings': [ | |
['CXX', '<(module_root_dir)/mason_packages/.link/bin/clang++'], | |
['CC', '<(module_root_dir)/mason_packages/.link/bin/clang'], | |
['LINK', '<(module_root_dir)/mason_packages/.link/bin/clang++'], | |
['AR', '<(module_root_dir)/mason_packages/.link/bin/llvm-ar'], | |
['NM', '<(module_root_dir)/mason_packages/.link/bin/llvm-nm'] | |
], |
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
sudo spctl --master-enable |
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
sudo spctl --master-disable |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>Add React in One Minute</title> | |
</head> | |
<body> | |
<h2>Add React in One Minute</h2> | |
<p>This page demonstrates using React with no build tooling.</p> |
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
{ | |
'targets': [ | |
{ | |
'target_name': 'bindings', | |
'sources': [ 'bindings.cc' ], | |
'cflags_cc!': [ '-fno-rtti' ], | |
'conditions': [ | |
['OS=="mac"', { | |
'xcode_settings': { | |
'GCC_ENABLE_CPP_RTTI': 'YES' |
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
const {createServer} = require('http'); | |
const {promisify} = require('util') | |
const hostname = '127.0.0.1'; | |
const port = 3000; | |
const server = createServer((req, res) => { | |
res.statusCode = 200; | |
res.setHeader('Content-Type', 'text/plain'); | |
res.end('Hello World'); |
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
func carray2slice(array *C.int, len int) []C.int { | |
var list []C.int | |
sliceHeader := (*reflect.SliceHeader)((unsafe.Pointer(&list))) | |
sliceHeader.Cap = len | |
sliceHeader.Len = len | |
sliceHeader.Data = uintptr(unsafe.Pointer(array)) | |
return list | |
} |