Skip to content

Instantly share code, notes, and snippets.

Avatar
🛠️
ars longa vita brevis

Leandro Ostera ostera

🛠️
ars longa vita brevis
View GitHub Profile
View config.ml
open Rresult
open Sexplib0.Sexp
let parse root_path =
let read_config path =
let root_path = path |> Fpath.to_dir_path |> Fpath.normalize in
let odot_file = Fpath.append root_path Model.config_file in
Bos.OS.File.read odot_file
in
View gist:69e3ec96a3e2e3d25f8fee564898d392
info Skipping @opam/zed@opam:1.6
info Skipping @opam/zarith@opam:1.7
info Skipping @opam/yojson@opam:1.7.0
info Skipping @opam/x509@opam:0.6.3
info Skipping @opam/uri@opam:2.2.1
info Skipping @opam/tls@opam:0.10.2
info Skipping @opam/stringext@opam:1.6.0
info Skipping @opam/stdlib-shims@opam:0.1.0
info Skipping @opam/stdio@opam:v0.12.0
info Skipping @opam/ssl@opam:0.5.7
@ostera
ostera / future.md
Created Feb 18, 2017 — forked from xaviervia/future.md
2017-02-18
View future.md
  • Blockchain of blockchains with RSA public keys for resource registry (domain + intents/messages accepted)
  • Go down from HTTP/WS to have a simpler/more essential protocol for communication. Protocol not based on simple human analogies (verb, noun)
  • Protocol is (hopefully) implementation of Real OOP.
  • External resources in the language are represented with URLs
  • Discovery/caching decisions (URL resolution) is delegated to the runtime
  • Runtime should eventually be a hypervisor that only manages resource allocation. Or dedicated hardware, programs for FPGA. High level functional language for FPGA programming.
  • Language is expressed in an AST. AST can be formatted in different transport encodings (JSON for example).
  • Language is just representation of category theory operations between the resources, assuming they fulfillthe expected types.
  • Language is lazy and asynchonous by default. Tagline: "sync is just async that works very fast"
  • Under the hood, operations are Real OOP (messages)
@ostera
ostera / xhyve-freebsd-tutorial-1.md
Created Dec 2, 2016 — forked from tanb/xhyve-freebsd-tutorial-1.md
FreeBSD running on xhyve tutorial. (Appendix: Resize image with qemu. Create FreeBSD VM with qemu).
View xhyve-freebsd-tutorial-1.md

TL;DR

  • Create 5GB FreeBSD image.
  • Install FreeBSD on xhyve.
  • Mount host directory.

Requisites

@ostera
ostera / README.md
Created Apr 19, 2016 — forked from dnozay/_Jenkins+Script+Console.md
jenkins groovy scripts collection.
View README.md
@ostera
ostera / ask_area.erl
Last active Aug 29, 2015
ask_area.erl
View ask_area.erl
-module(ask_area).
-export([print_area/0]).
print_area() ->
try area() of
Area -> io:format("The area is ~p~n", [Area])
catch
error:Err -> io:format("~s~n", [error_msg(Err)])
end.
View shiftand.erl
-module(shiftand).
%% shiftand:match("announce", "annual_announce").
-export([match/2]).
match(Pattern, Text) ->
PatLen = length(Pattern),
BitMaskTable = init_table(Pattern),
MatchMask = 1 bsl (PatLen - 1),
View gist:49eceeb44f55adc914d9
1 ASPMX.L.GOOGLE.COM
5 ALT1.ASPMX.L.GOOGLE.COM
5 ALT2.ASPMX.L.GOOGLE.COM
10 ALT3.ASPMX.L.GOOGLE.COM
10 ALT4.ASPMX.L.GOOGLE.COM
View gist:449cbad7150aa6124494
$(document).ready(function() {
$("#events_search input").keyup(function() {
timer = setTimeout(function() {
$.get($("#events_search").attr("action"), $("#events_search").serialize(), null, "script");
$('#events-partial').addClass('animated fadeIn');
window.setTimeout( function(){
$('#events-partial').removeClass('animated fadeIn');
}, 600);
return false;
}, 2000);
View gist:7ddd4355f78861738096
class ApplicationController < ActionController::Base
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
protect_from_forgery with: :exception
helper_method :current_user
alias_method :devise_current_user, :current_user
def current_user
@current_user ||= if session[:user_id]