Skip to content

Instantly share code, notes, and snippets.

View colm-mchugh's full-sized avatar
🐳
<.> .. <.>

Colm colm-mchugh

🐳
<.> .. <.>
  • Ireland
View GitHub Profile
@colm-mchugh
colm-mchugh / plemm.rb
Last active May 10, 2017 03:59
Plemm questionnaire
class A
attr_accessor :x
def initialize()
@x = 3
end
def f()
@x
end
def g()
@x + f()
@colm-mchugh
colm-mchugh / PlemmTest.java
Created May 10, 2017 03:57
plemm questionnaire - java
package plemm;
import org.junit.Test;
public class PlemmTest {
static class A {
int x;
public A() {
@colm-mchugh
colm-mchugh / plemm.sml
Created May 10, 2017 03:56
plemm questionnaire - ML
(** Question 1 **)
fun f1() =
(d = 32; g())
fun g() =
d + 3
f1()
@colm-mchugh
colm-mchugh / query_client.go
Created March 20, 2015 21:03
multi-threaded client. Starts up multiple clients to process a stream of requests.
package main
import (
"bufio"
"crypto/md5"
"encoding/hex"
"encoding/json"
"flag"
"fmt"
"io/ioutil"
@colm-mchugh
colm-mchugh / pool_demo.go
Last active May 20, 2024 14:18
Using channel and sync.Pool to maintain a pool of bytes.Buffer
package main
import (
"bytes"
"encoding/json"
"flag"
"io"
"log"
"net/http"
@colm-mchugh
colm-mchugh / README
Last active August 29, 2015 14:09
Expose gometrics using expvar
go get
go run expvar_demo.go
curl http://localhost:8080/hello?user=lassie
curl http://localhost:8080/hello?user=tom
curl http://localhost:8080/hello?user=IveAVeryLoooongName