https://lwn.net/Articles/740157/
This file contains hidden or 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 { Socket, TCP } = library('socket', {}) | |
const server = new Socket(TCP) | |
const read = Buffer.alloc(64 * 1024) | |
const write = Buffer.alloc(64 * 1024) | |
const bytes = new Uint8Array(read.bytes) | |
let off = 0, records = 0, resLength = 0 | |
const response = `HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\nServer: dv8\r\nDate: ${(new Date()).toUTCString()}\r\nContent-Length: 13\r\n\r\nHello, World!` | |
while (1) { | |
resLength = write.write(response, off) | |
off += resLength |
## clone the gist
git clone [email protected]:3f612e0bb9758e7fe80e629e3dc6b2c2.git
cd 3f612e0bb9758e7fe80e629e3dc6b2c2
## the docker command to use
DV8_DNS="docker run -it --rm --name=dv8-dns --net=host -v $(pwd):/app billywhizz/dv8:0.0.5a dv8 ./dns.js"
## query google 8.8.8.8 dns server using UDP on port 53
$DV8_DNS www.google.com
## query local dnsmasq using UDP on port 53
- run ./setup.sh
- go to http://127.0.0.1:1337 for konga
- log in as admin / adminadminadmin
- create new connection with name kong and url http://kong:8001
This file contains hidden or 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 Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
this is a test. i am writing. how cool
here is a list
- omg
here is some code
let a = b;
This file contains hidden or 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
function inherits(ctor, superCtor) { | |
ctor.super_ = superCtor; | |
ctor.prototype = Object.create(superCtor.prototype, { | |
constructor: { | |
value: ctor, | |
enumerable: false, | |
writable: true, | |
configurable: true | |
} | |
}); |
This file contains hidden or 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
Array.prototype.sliceAfter = function(expr) { | |
var index = 0; | |
var found = this.some(function(v, i, a) { | |
if(v > expr) { | |
index = i; | |
return true; | |
} | |
}); | |
if(!found) return []; | |
return this.slice(index); |
This file contains hidden or 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
diff --git a/src/oracle_bindings.cpp b/src/oracle_bindings.cpp | |
old mode 100644 | |
new mode 100755 | |
index bbcf611..1ea38a2 | |
--- a/src/oracle_bindings.cpp | |
+++ b/src/oracle_bindings.cpp | |
@@ -84,6 +84,7 @@ void OracleClient::EIO_Connect(uv_work_t* req) { | |
std::ostringstream connectionStr; | |
connectionStr << "//" << baton->hostname << ":" << baton->port << "/" << baton->database; | |
baton->connection = baton->environment->createConnection(baton->user, baton->password, connectionStr.str()); |