Skip to content

Instantly share code, notes, and snippets.

@pogliamarci
pogliamarci / lex.lang
Last active December 15, 2015 07:49
Syntax highlighting specification file for lex/flex (the lexical analyzer often used alongside bison/yacc), to be used in gtksourceview (used by Gedit). Should do its work :)
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Marcello Pogliani
Copyright (C) 2012 Marcello Pogliani
GtkSourceView is free software; you can redistribute it and/or
@pogliamarci
pogliamarci / patch.diff
Last active December 18, 2015 14:28
Patch to make ACSE compile under OSX (changed dependency from malloc.h with dependency from stdlib.h)
diff -Naur ../acse_1.1.0/VERSION acse_1.1.0/VERSION
--- ../acse_1.1.0/VERSION 2008-12-27 03:15:42.000000000 +0100
+++ acse_1.1.0/VERSION 2014-02-05 15:49:16.945461917 +0100
@@ -1 +1 @@
-1.1.0
+1.1.1
diff -Naur ../acse_1.1.0/acse/Acse.y acse_1.1.0/acse/Acse.y
--- ../acse_1.1.0/acse/Acse.y 2008-12-23 17:02:28.000000000 +0100
+++ acse_1.1.0/acse/Acse.y 2014-02-05 15:49:16.945461917 +0100
@@ -17,7 +17,6 @@
@pogliamarci
pogliamarci / scalarprod.hs
Last active December 20, 2015 00:59
scalarprod
infixl 8 ***
(***) :: (Num a) => [a] -> [a] -> a
(***) a b = foldl1 (+) (cartprod a b) -- or foldl (+) 0
where
cartprod a b = [h*k | (h,k) <- zip a b]
-- just a tiny test :)
main :: IO ()
main = do
print $ [1,2,3] *** [1,1,1] + [3,4,5] *** [34,4,5] * 3 -- output: 435

Keybase proof

I hereby claim:

  • I am pogliamarci on github.
  • I am mpogliani (https://keybase.io/mpogliani) on keybase.
  • I have a public key whose fingerprint is 1F5A 32E7 2B96 53E7 CE47 8110 8309 0489 6297 F294

To claim this, I am signing this object:

@pogliamarci
pogliamarci / jwks
Last active October 14, 2022 23:26
{"keys":[{"alg":"RS256", "kty": "RSA", "e": "AQAB", "kid": "257bcd5b-caa9-4070-8ca7-5470ac985cb8", "n": "qsEqVoAcZSjhF4uQsLfe2TbQsXUwym0q842_qZ-NXgrd5kPVKkz2mRaC0JhKR1ksuw2i1raYRXanA7YjeIvzTHWT-oFfjaAWi0eEQISK1wByP649cNWOIXMAj7PMUoZdBZf4wj8QqTYOJL9qDHaFxW_Ya4bLcdigcdFjz03V8OSJwxAoYj_7X4fcT-mPAnmFpFsiFJaGwXGBWH8yvdjzpq32xuJca4l-0tB3u_vIFpLWaUJtz3pYSUHg6rfqPvDBa33sIaEYtjnhR929Jq5fVZVqbISBZtAy75ckKujdvDPBzGPxnwGjZvwdnEXZjaGn6PtgUOnSbRqgQGtaB6_b9w", "use": "sig" }]}