Skip to content

Instantly share code, notes, and snippets.

View donaldh's full-sized avatar
💯

Donald Hunter donaldh

💯
View GitHub Profile
@donaldh
donaldh / logstash-syslog.conf.rb
Created November 2, 2016 12:12
Parsing IOS & XR syslogs
input {
udp {
port => 514
type => "syslog"
}
}
filter {
if [type] == "syslog" {
grok {
@donaldh
donaldh / golf.raku
Created October 26, 2020 15:48
ENV strings embedded in bytecode
use Test;
@donaldh
donaldh / build.log
Last active October 26, 2020 15:43
Building rakudo-star-2020.05 from rakudo-star-2020.05.tar.gz
/rakudo-star-2020.05/lib/actions/install.bash: line 34: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8): No such file or directory
/rakudo-star-2020.05/lib/actions/install.bash: line 43: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)
[2020-09-16T19:01:45] [INFO] Installing Raku in /opt/raku
[2020-09-16T19:01:45] [INFO] Starting build on MoarVM
[2020-09-16T19:01:45] [NOTIC] Using /rakudo-star-2020.05/tmp/tmp.RUJkmckVAF as working directory
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = "C.UTF-8",
LANG = (unset)
@donaldh
donaldh / multidim-gist.log
Last active May 12, 2020 15:28
Proposed .gist output for multidim arrays
% ./rakudo-m -e 'say my @a[100;100] = (1..100) xx 100'
[[1 2 3 4 5 6 7 8 9 10 ...]
[1 2 3 4 5 6 7 8 9 10 ...]
[1 2 3 4 5 6 7 8 9 10 ...]
[1 2 3 4 5 6 7 8 9 10 ...]
[1 2 3 4 5 6 7 8 9 10 ...]
[1 2 3 4 5 6 7 8 9 10 ...]
[1 2 3 4 5 6 7 8 9 10 ...]
[1 2 3 4 5 6 7 8 9 10 ...]
[1 2 3 4 5 6 7 8 9 10 ...]
@donaldh
donaldh / multidim-gist.log
Created May 12, 2020 15:16
Proposed .gist output for multidim arrays
% ./rakudo-m -e 'say my int @a[2;100;100]'
[[[0 0 0 0 0 0 0 0 0 0 ...]
[0 0 0 0 0 0 0 0 0 0 ...]
[0 0 0 0 0 0 0 0 0 0 ...]
[0 0 0 0 0 0 0 0 0 0 ...]
[0 0 0 0 0 0 0 0 0 0 ...]
[0 0 0 0 0 0 0 0 0 0 ...]
[0 0 0 0 0 0 0 0 0 0 ...]
[0 0 0 0 0 0 0 0 0 0 ...]
[0 0 0 0 0 0 0 0 0 0 ...]

Golfing Faster FASTA

After reading Timotimo’s excellent Faster FASTA Please blog post, I wanted to test the performance of some other Perl 6 methods.

IO.slurp.lines

This is my baseline which incorporates Timotimo’s performance improvements to the original solution, somewhat simplified.

my %seqs;
@donaldh
donaldh / README.md
Created June 12, 2012 22:36
force-multi-foci with convex hulls

I have modified the force-multi-foci example to add a convex hull around each cluster of nodes.

I achieved this by using d3.nest() to create a new dataset of clusters containing the nodes in each cluster. Then in the tick() method I create and update the path element for each cluster in this dataset.

@donaldh
donaldh / index.html
Created June 13, 2012 21:05
force with link labels
<html>
<head>
<title>Force with Labelled Links</title>
<script src="http://mbostock.github.com/d3/d3.js?2.9.2"></script>
<style type="text/css">
.node {
fill: #88f;
stroke: #44a;
stroke-width: 1px;
}
@donaldh
donaldh / README.md
Created April 24, 2015 16:13
Working around OSX legacy Java 1.6 launch dependency for JavaApplicationStub

Fake the existence of 1.6.0 jdk (for whaever reason)

sudo mkdir -p /System/Library/Java/Support/Deploy.bundle
sudo mkdir -p /System/Library/Java/JavaVirtualMachines/1.6.0.jdk

Symlink the JVM library to the required file for JavaApplicationStub.

sudo mkdir -p /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bundle/Libraries
sudo ln -s /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/server/libjvm.dylib \

/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bundle/Libraries/libserver.dylib