Skip to content

Instantly share code, notes, and snippets.

Avatar
🛠️
ars longa vita brevis

Leandro Ostera ostera

🛠️
ars longa vita brevis
View GitHub Profile
@ostera
ostera / config.ml
Last active February 10, 2020 22:39 — forked from p1xelHer0/config.ml
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 February 18, 2017 20:58 — 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 December 2, 2016 22:26 — 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 April 19, 2016 07:48 — forked from dnozay/_Jenkins+Script+Console.md
jenkins groovy scripts collection.
View README.md
View growl-xcode.patch
--- growl.new/Plugins/Actions/SMS/GrowlSMSDisplay.m 2013-04-24 12:50:06.000000000 -0700
+++ growl/Plugins/Actions/SMS/GrowlSMSDisplay.m 2013-04-24 12:38:47.000000000 -0700
@@ -138,7 +138,7 @@
CFDataRef postData = CFStringCreateExternalRepresentation(kCFAllocatorDefault, dataString, kCFStringEncodingUTF8, 0U);
CFURLRef clickatellURL = CFURLCreateWithString(kCFAllocatorDefault, CFSTR("https://api.clickatell.com/xml/xml"), NULL);
NSMutableURLRequest *post = [[NSMutableURLRequest alloc] initWithURL:(NSURL *)clickatellURL];
- CFStringRef contentLength = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR("%u"), CFDataGetLength(postData));
+ CFStringRef contentLength = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR("%lu"), CFDataGetLength(postData));
// NSLog(@"SMS display: Sending data: %@", postData);
@ostera
ostera / gist:4008305
Created November 3, 2012 19:07
Access DB
View gist:4008305
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package Formularios;
import java.sql.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
@ostera
ostera / gist:1925857
Created February 27, 2012 17:54 — forked from defunkt/gist:6443
View gist:1925857
# Video: http://rubyhoedown2008.confreaks.com/08-chris-wanstrath-keynote.html
Hi everyone, I'm Chris Wanstrath.
When Jeremy asked me to come talk, I said yes. Hell yes. Immediately. But
then I took a few moments and thought, Wait, why? Why me? What am I supposed
to say that's interesting? Something about Ruby, perhaps. Maybe the
future of it. The future of something, at least. That sounds
keynote-y.
@ostera
ostera / ask_area.erl
Last active August 29, 2015 14:27
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),