No more self-sighed certs. Use something like LetsEncrypt.
We currently have “star” topology. That means that when my server goes down everyone suffers. If when my server goes down, other servers
> function decrypt(s) { return Buffer.from([].slice.call(s).reverse().join('').split(' ').map(s => Number.parseInt(s, 2))).toString(); } | |
undefined | |
> decrypt('10100110 10110110 11110110 11001110 10100110 11101110 10000110 00000100 10100110 01001110 10000110 00000100 10101110 11110110 10011010') | |
'You are awesome' |
using System; | |
using System.Diagnostics; | |
using System.Text; | |
using System.Threading; | |
using System.Threading.Tasks; | |
class Program | |
{ | |
static void Main(string[] args) | |
{ |
using System; | |
using System.Data; | |
using System.Data.SqlClient; | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
using (SqlConnection connection = new SqlConnection(new SqlConnectionStringBuilder | |
{ |
SCGI: A Simple Common Gateway Interface alternative | |
Neil Schemenauer <[email protected]> | |
2008-06-23 | |
1. Introduction | |
The SCGI protocol is a replacement for the Common Gateway Interface | |
(CGI) protocol. It is a standard for applications to interface with | |
HTTP servers. It is similar to FastCGI but is designed to be easier | |
to implement. |
Incomplete. I just posted to save my progress, probably completely wrong still…
CGI (Common Gateway Interface) has been around for a long time and is considered a standard for server-side dynamic content generation.
CGI provides a mapping from URI to a script stored on a filesystem and a protocol for activating the script, sending the client’s request, and returning the script’s response to the client.
CGI communicates headers and request information to the script by setting well known environment variables and executes it to activate it.
This results in different types of overhead: concurrent requests require multiple processes and each request requires a fork()
, exec()
, and quite likely a script interpreter which may need to consume many resources before being able to respond to the request.
#!/usr/bin/env node | |
if (process.env.different === '1') { | |
require('./mod2'); | |
} | |
const mod1 = require('./mod1'); | |
const mod2 = require('./mod2'); | |
console.log(mod1.enum1+''); | |
console.log(mod2.enum2+''); |
Mono C# Shell, type "help;" for help | |
Enter statements below. | |
csharp> LoadAssembly("System.Xml.Linq"); | |
csharp> using System.Xml.Linq; | |
csharp> (int)XElement.Parse("<x xml:space=\"preserve\">
</x>").Value[0] | |
13 | |
csharp> (int)XElement.Parse("<x xml:space=\"preserve\"> </x>").Value[0] | |
13 |
ohnobinki@gibby ~ $ echo '<x>&#a;</x>' | xmllint - | |
-:1: parser error : CharRef: invalid decimal value | |
<x>&#a;</x> | |
^ | |
-:1: parser error : xmlParseCharRef: invalid xmlChar value 0 | |
<x>&#a;</x> | |
^ |
const fs = require('fs'); | |
module.exports = function writeFileSafely(tempPath, destPath, contents, callback) { | |
fs.open(tempPath, 'w', function (err, fd) { | |
if (err) { | |
callback(err); | |
} else { | |
fs.createWriteStream(null, { | |
fd: fd, | |
autoClose: false, | |
}).on('error', function (err) { |