Skip to content

Instantly share code, notes, and snippets.

View lclarkmichalek's full-sized avatar

Laurie Clark-Michalek lclarkmichalek

View GitHub Profile
@lclarkmichalek
lclarkmichalek / gist:716164
Created November 26, 2010 01:35
In defence of Marak Squires
In recent days (the last 12-24 hours), there have been a couple of posts on a one
'Marak Squires', who goes by the tag JimBastard. He stands accused of stealing code,
and being a general douchebag. Stealing code isn't good. Being a douchebag isn't
acutally illegal. However, the way that the campaign against him has been carried
out worries me.
The post to reddit that brought this issue to attention was entitled 'Code Thief at
Large: Marak Squires / JimBastard'. It can be found here:
http://www.reddit.com/r/programming/comments/ebge2/code_thief_at_large_marak_squires_jimbastard/.
It was a link to a github gist that can be found here:

Mobile computing is primarily defined by the use of mobile devices at the edge of the network. Whereas traditional computing would often involve the use of static devices connected to a secure network while protected by a layer of physical security, mobile computing involves using mobile devices such as smartphones which are connected to a potentially insecure network, with no physical security. In some cases, mobile computing also involves transferring responsibilities that were previously analogue or manual, and digitalising them in the process. For example, the process of recording a biological sample might require recording the name of the sample, along with taking a photo. In a non mobile computing system, the photo and name would be recorded on separate mediums, and collated together after the photo has been developed. In a mobile computing system, the photo could be taken digitally, and associated with the name of the sample (and any other records) immediately. While this might seem tangential to mobil

package main
import (
"flag"
"time"
"context"
etcd "github.com/coreos/etcd/clientv3"
"github.com/golang/glog"
@lclarkmichalek
lclarkmichalek / keybase.md
Created June 6, 2017 04:00
keybase proof

Keybase proof

I hereby claim:

  • I am lclarkmichalek on github.
  • I am laurie (https://keybase.io/laurie) on keybase.
  • I have a public key ASCShXi8EDq9NFDJ5UDMVlLRteY6zMRoqNnT9Ot2Acq-Zwo

To claim this, I am signing this object:

relabel_configs:
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape]
regex: "true"
action: keep
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scheme]
regex: (https?)
target_label: __scheme__
action: replace
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path]
regex: (.+)
global:
scrape_interval: 15s
scrape_timeout: 10s
evaluation_interval: 1m
rule_files:
- /etc/prometheus/rules/*.rules
scrape_configs:
- job_name: cadvisor
params:
module:
url := fmt.Sprintf("%v/dist/v1/%v/artifact/%v/%v", baseURL, repoName, version, runtime.GOOS)
debug("GET", url)
resp, err := client.Get(url)
if err != nil {
return errors.Wrap(err, "could not request latest version download")
}
defer resp.Body.Close()
debug("GET", resp.StatusCode, url)
if !(200 <= resp.StatusCode && resp.StatusCode < 300) {
data, _ := ioutil.ReadAll(resp.Body)
diff --git a/shader.go b/shader.go
index 9be9c52..aec8742 100644
--- a/shader.go
+++ b/shader.go
@@ -39,15 +39,15 @@ func (shader Shader) GetSource() string {
var length C.GLint
C.glGetShaderiv(C.GLuint(shader), C.GLenum(SHADER_SOURCE_LENGTH), &length)
- log := C.malloc(C.size_t(len + 1))
- C.gogl_glGetShaderSource(C.GLuint(shader), C.GLsizei(len), nil, (*C.GLchar)(log))
@lclarkmichalek
lclarkmichalek / gist:1657284
Created January 22, 2012 14:52
Flymake mode for golang
(require 'flymake)
(defvar go-compiler "8g")
(defun flymake-go-init ()
(let* ((temp-file (flymake-init-create-temp-buffer-copy
'flymake-create-temp-inplace))
(local-file (file-relative-name
temp-file
(file-name-directory buffer-file-name))))
@lclarkmichalek
lclarkmichalek / gist:1653245
Created January 21, 2012 16:43
Benchmark of lazy properties in python
from __future__ import print_function
import timeit
t1 = """
class Test():
_bar = None
@property
def bar(self):
if self._bar is not None: