Skip to content

Instantly share code, notes, and snippets.

#!/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 / 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"
)
/*
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 / 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>
@mpl
mpl / gist:3619464
Created September 4, 2012 10:08
stopping an http server
package main
import (
"fmt"
"log"
"net/http"
"net"
"time"
"sync"
)
@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"
package main
import (
"bytes"
"encoding/base64"
"flag"
"fmt"
"io"
"log"
"net/http"
package main
import (
"bytes"
"encoding/base64"
"flag"
"fmt"
"io"
"log"
"mime"
/*
Copyright 2013 The Go 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
* `server`: The camlistored server to connect to, of the form:
"[http[s]://]host[:port][/prefix]". Defaults to https. This option can be
overriden with the "-server" command-line flag.
Most client commands are meant to communicate with a blobserver. For such commands, instead of the client relying on discovery to choose the actual URL, the server URL can point directly to a specific blobserver handler, of the form:
"[http[s]://]host[:port][/prefix][/handler/]".
For example, if one wanted to speed up syncing with `camtool sync`, one could write directly to the destination's blobserver, instead of the default, which is to write to both the destination blobserver and index. The above configuration sample can be extended by adding the following alias, where "`/bs/`" is the handler of the primary blobserver:
"servers": {