Skip to content

Instantly share code, notes, and snippets.

You Are A:
Neutral Good Elf Wizard (5th Level)
Ability Scores:
Strength- 14
Dexterity- 11
@isido
isido / .emacs
Created January 23, 2014 12:10
Emacs configuration at work
(add-to-list 'load-path "/usr/local/Cellar/ledger/2.6.3/share/emacs")
(require 'ledger)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(inhibit-default-init nil)
'(inhibit-startup-screen t))
(custom-set-faces
var min = [ 1024, 7000, 512];
var max = [ 1024, 1000000, 2048];
var pri = [ 1024, 7000, 512];
var fac = new Array(3);
var free_space = 35000;
for (var i = 0; i < min.length; ++i) {
fac[i] = pri[i] - min[i];
}
@isido
isido / gist:3ff6f251f98f3736fee6
Created June 6, 2014 09:00
CentOS: after update, check which processes use old libs.
lsof | grep 'DEL.*lib' | cut -f 1 -d ' ' | sort -u
@isido
isido / gist:879812f0e92eae5185e1
Created July 7, 2014 09:13
Switch to JDK 7 on OSX
$ export JAVA_HOME=$(/usr/libexec/java_home -v 1.7)
@isido
isido / read_file.sml
Last active August 29, 2015 14:17
SML snippets
fun read_file in_stream =
let
fun loop ins =
case TextIO.inputLine ins of
SOME line => line :: loop ins
| NONE => []
in
loop in_stream before TextIO.closeIn in_stream
end
@isido
isido / gist:6bd862616869d1b5b9ce
Last active December 17, 2015 12:47
Things to do with new OpenBSD installation
1. Set up package mirror:
export PKG_PATH=http://ftp.eu.openbsd.org/pub/OpenBSD/$(uname -r)/packages/$(machine -a)/
(+ put it to ~/.profile)
@isido
isido / dspace.sql
Created April 20, 2016 08:25
Select items with certain metadata set
select a.text_value "uef.solecris.id", b.text_value "dc.title"
from (
select resource_id, text_value
from metadatavalue
where metadata_field_id = (
select metadata_field_id
from metadatafieldregistry r, metadataschemaregistry s
where s.short_id = 'uef' and r.element = 'solecris'
and r.qualifier = 'id' and r.metadata_schema_id = s.metadata_schema_id)) a
@isido
isido / myjulias.jl
Created June 20, 2016 11:39
Misc. Julia functions
# e element, m modulus
function print_multexp_table(e, m)
println("------------");
for i = 0:(m-1)
@printf "%d\t%d\n" i ((i * e) % m)
end
end

Keybase proof

I hereby claim:

  • I am isido on github.
  • I am isido (https://keybase.io/isido) on keybase.
  • I have a public key whose fingerprint is 0CAA 34F6 444D F268 DB17 F1E2 2A72 AE8F 9D26 059B

To claim this, I am signing this object: