Skip to content

Instantly share code, notes, and snippets.

@bithavoc
bithavoc / asset_helper.rb
Created October 23, 2017 01:42 — forked from jeremyruppel/asset_helper.rb
Inline asset helpers for middleman.
module AssetHelper
##
# Renders a stylesheet asset inline.
def inline_stylesheet( name )
content_tag :style do
sprockets[ "#{name}.css" ].to_s
end
end
@bithavoc
bithavoc / tls-client
Last active September 22, 2015 14:22 — forked from michaljemala/tls-client.go
SSL Client Authentication Golang sample
package main
import (
"crypto/tls"
"crypto/x509"
"flag"
"io/ioutil"
"log"
"net/http"
)
@bithavoc
bithavoc / file.md
Created November 24, 2012 18:13 — forked from guilleiguaran/file.md
Why Google V8 is not suited for integration into servers

Why Google V8 is not suited for integration into servers

06/09/2010

Last time I studied the ability to embed javascript in nginx using the library Google V8 Javascript Engine , it should be noted, was no easy task, as all that complicated the classic "Hello World!", reflected in the documentation is extremely sketchy. Because V8 developed primarily for Chrome, then this left a significant imprint on him and, to paraphrase Henry Ford's statement about the color of the machine, it can be said that the V8 will work well in any application, provided that this program is called Chrome.

First of all, V8 does not know how to handle memory allocation errors - it just ends the process. This is acceptable for such a browser like Chrome, which displays each page in a separate process, and the crash of one process does not affect the other pages, but for the server to process in one process thousands of simultaneous connections, it does not fit. While V8 allows you to set your own error handler memory allocation, howe