Heroku é uma plataforma em nuvem baseada em sistemas de containers gerenciados, chamados de Dynos, possuidores de um ambiente de software plugável e configurável, preparados para rodar e depurar sistemas web em um número limitado de linguagens de programação. Uma característica atrativa dessa tecnologia é a facilidade de realizar deploy de sistemas, uma vez que o ambiente é preparado para as diversas linguagens suportadas. Por outro lado, a liberdade de configuração desses ambientes é limitada.
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
local xxd_dump_cmd = 'xxd -g 1 -u' | |
local xxd_cur_pos = nil | |
local function is_binary_file() | |
local filename = vim.fn.expand('%:t') | |
-- local basename = string.match(filename, "^[a-z]*$") | |
local binary_ext = { 'png', 'jpg', 'jpeg', 'out' } | |
local ext = string.match(filename, "%.([^%.]+)$") | |
if ext == nil and string.match(filename, '[a-z]+') then return true end |
This project is a tiny compiler for a very simple language consisting of boolean expression.
The language has two constants: 1
for true and 0
for false, and 4 logic gates:
!
(not), &
(and), |
(or), and ^
(xor).
It can also use parentheses to manage priorities.
Here is its grammar in BNF format:
expr ::= "0" | "1"
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
namespace Domain | |
open System | |
open System.Runtime.CompilerServices | |
open System.Globalization | |
[<AutoOpen>] | |
module rec Money = | |
[<Struct;IsReadOnly>] | |
type Money = private Money of decimal * Currency with |
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
:root { | |
box-sizing: border-box; | |
} | |
*, ::before, ::after { | |
box-sizing: inherit; | |
} | |
html { | |
scroll-behavior: smooth; | |
} |
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
// This sample will guide you through elements of the F# language. | |
// | |
// ******************************************************************************************************* | |
// To execute the code in F# Interactive, highlight a section of code and press Alt-Enter in Windows or | |
// Ctrl-Enter Mac, or right-click and select "Send Selection to F# Interactive". | |
// You can open the F# Interactive Window from the "View" menu. | |
// ******************************************************************************************************* | |
// For more about F#, see: |
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
module ProtobufSerializationTests | |
open System | |
open System.IO | |
open ProtoBuf | |
open Xunit | |
module ProtoBufUtils = | |
[<ProtoContract>] |
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
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
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
// This sample will guide you through elements of the F# language. | |
// | |
// ******************************************************************************************************* | |
// To execute the code in F# Interactive, highlight a section of code and press Alt-Enter in Windows or | |
// Ctrl-Enter Mac, or right-click and select "Send Selection to F# Interactive". | |
// You can open the F# Interactive Window from the "View" menu. | |
// ******************************************************************************************************* | |
// | |
// For more about F#, see: | |
// http://fsharp.org |
NewerOlder