Skip to content

Instantly share code, notes, and snippets.

package main
import (
"bytes"
"encoding/base64"
"flag"
"fmt"
"io"
"log"
"net/http"
@mpl
mpl / gist:af6b76fbd81bb9a81079
Created May 21, 2015 15:34
react new props
<!DOCTYPE html>
<html>
<head>
<title>Hello React</title>
<script src="react/react-with-addons.js"></script>
<!--
<script src="https://fb.me/JSXTransformer-0.13.3.js"></script>
-->
</head>
<body>
/*
Copyright 2014 The Camlistore Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@mpl
mpl / gcs stat
Created September 18, 2014 14:00
import (
gcstorage2 "github.com/GoogleCloudPlatform/gcloud-golang/storage"
)
var (
projectId = "scancabcamli"
serviceAccount = "886924983567-uiln6pus9iuumdq3i0vav0ntveodas0r@developer.gserviceaccount.com"
)
#!/bin/sh
xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation" 8 1
xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Button" 8 3
xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Timeout" 8 200
xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Axes" 8 6 7 4 5
xinput set-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 0
@mpl
mpl / kvtest
Last active December 21, 2015 21:09
basic kv test
package main
import (
"log"
"github.com/cznic/kv"
)
func testKv() {
fullPath := "foo.kv"
@mpl
mpl / gist:3619464
Created September 4, 2012 10:08
stopping an http server
package main
import (
"fmt"
"log"
"net/http"
"net"
"time"
"sync"
)