Skip to content

Instantly share code, notes, and snippets.

View kierdavis's full-sized avatar

Kier Davis kierdavis

View GitHub Profile
# Context
I'm writing a small library for modelling digital logic using
FRP-style behaviours. The core type is a Node:
> type Node = Integer -> Bool
which represents a boolean value varying over integral timesteps.
I also want to model a bus (a fixed-width array) of nodes, using a type-safe
Prelude> mapM_ print [let h = 10^^(negate i) in (e**h - 1)/h | i <- [1..11]]
1.0517091807564771
1.005016708416795
1.0005001667083846
1.000050001667141
1.000005000006965
1.0000004999621837
1.0000000494336803
0.999999993922529
1.000000082740371
@kierdavis
kierdavis / keybase.md
Created April 21, 2014 21:08
Verification of my Keybase identity

Keybase proof

I hereby claim:

  • I am kierdavis on github.
  • I am kierdavis (https://keybase.io/kierdavis) on keybase.
  • I have a public key whose fingerprint is 69CB 931A 0A73 A3A2 3FB2 7B7F 6DA4 DA6B 003D 9C5A

To claim this, I am signing this object:

@kierdavis
kierdavis / PKGBUILD
Last active August 29, 2015 14:15
logisim-evolution 2.13.6 PKGBUILD
# Maintainer: Marcel Korpel <marcel[dot]korpel[at]gmail>
# Contributor: Renan Birck <renan.ee.ufsm at gmail.com>
pkgname=logisim-evolution
_truepkgname=logisim
pkgver=2.13.6
pkgrel=1
provides=('logisim')
conflicts=('logisim')
pkgdesc='An educational tool for designing and simulating digital logic circuits'

Please publicly post the following Gist, and name it keybase.md:

Keybase proof

I hereby claim:

  • I am kierdavis on github.
  • I am kierdavis (https://keybase.io/kierdavis) on keybase.
  • I have a public key whose fingerprint is E9EF A7E7 7400 759D A6AD B9E0 8139 C5FC EDA7 3ABF
@kierdavis
kierdavis / gerry.py
Created November 17, 2015 13:48
Nov 2015 Code Dojo
import random
text = """Paste input text here"""
voters = []
for line in text.split():
voters.append(map(int, line))
gerry = [[0]*100 for i in range(100)]
@kierdavis
kierdavis / funding.txt
Created February 3, 2016 18:29
(Successful) SUSU funding application for eSports society
Funding Application
Pot: Capital
Title of Application
Systems for eSports Society - Project
What do you need and why?
The core of the eSports society is to encourage and facilitate the growth of electronic sports within the university. This constitutes around developing a welcoming environment that allows new and experienced players to participate in both social and competitive activities. In order to achieve this goal, the society requires systems capable of running software at a satisfactory level, in particular; League of Legends, Counter Strike Global Offensive, Hearthstone, Defense of the Ancients 2, Open Broadcasting Software, Video Editing, etc.
We have sought these systems through alternative channels, but have been unable to, due to our requirement of fitting a discrete graphics processing unit. We were, however, able to obtain monitors, mice, keyboards, Ethernet cables and other essential peripherals. Using the expertise of the committee members, whom have built systems of this calibre and above in
@kierdavis
kierdavis / vagrant.log
Created February 18, 2016 01:13
Output from (failing) vagrant setup
kier@maigre:~/srobo/git/server/puppet [master] $ vagrant up --provision
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'box-cutter/fedora22'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'box-cutter/fedora22' is up to date...
==> default: A newer version of the box 'box-cutter/fedora22' is available! You currently
==> default: have version '2.0.2'. The latest is version '3.0.3'. Run
==> default: `vagrant box update` to update.
==> default: Setting the name of the VM: puppet_default_1455756380334_19504
==> default: Clearing any previously set network interfaces...
@kierdavis
kierdavis / vagrant-error.log
Created February 18, 2016 01:18
Just the error sections from the vagrant output.
... snip ...
==> default: Error: Could not set 'directory' on ensure: Could not find user fritter at 55:/tmp/vagrant-puppet/modules-990ca820a2fa81304dc996d48d788636/sr_site/manifests/fritter.pp
==> default: Error: Could not set 'directory' on ensure: Could not find user fritter at 55:/tmp/vagrant-puppet/modules-990ca820a2fa81304dc996d48d788636/sr_site/manifests/fritter.pp
==> default: Wrapped exception:
==> default: Could not find user fritter
==> default: Error: /Stage[main]/Sr_site::Fritter/File[/home/fritter]/ensure: change from absent to directory failed: Could not set 'directory' on ensure: Could not find user fritter at 55:/tmp/vagrant-puppet/modules-990ca820a2fa81304dc996d48d788636/sr_site/manifests/fritter.pp
==> default: Notice: /Stage[main]/Sr_site::Fritter/Vcsrepo[/home/fritter/fritter]: Dependency File[/home/fritter] has failures: true
==> default: Warning: /Stage[main]/Sr_site::Fritter/Vcsrepo[/home/fritter/fritter]: Skipping because of failed dependencies
==> default: Notice: /Stage[main]/Sr_si
[vagrant@sr-vm ~]$ systemctl status gerrit.service
● gerrit.service - LSB: Start/stop Gerrit Code Review
Loaded: loaded (/etc/rc.d/init.d/gerrit)
Active: failed (Result: exit-code) since Thu 2016-02-18 01:06:33 UTC; 14min ago
Docs: man:systemd-sysv-generator(8)
Process: 18588 ExecStart=/etc/rc.d/init.d/gerrit start (code=exited, status=1/FAILURE)
[vagrant@sr-vm ~]$ sudo journalctl -x --no-pager
... snip ...
Feb 18 01:06:58 sr-vm audit[1]: <audit-1130> pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=user@1000 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Feb 18 01:06:58 sr-vm audit[1]: <audit-1131> pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=user@1000 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'