Skip to content

Instantly share code, notes, and snippets.

View SjB's full-sized avatar

Steve Beaulac SjB

  • London Ontario Canada
View GitHub Profile
@atotto
atotto / example_google-cloud-vision_test.go
Created August 13, 2016 07:42
google cloud vision golang example
package gcv_test
import (
"encoding/base64"
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
@alghanmi
alghanmi / wps_openwrt.sh
Last active January 28, 2021 00:47
WPS on OpenWRT -- Enabling Wi-Fi Protected Setup on OpenWRT
##
## WPS on OpenWRT
## This script enables Wi-Fi Protected Setup on OpenWRT.
##
## Resources
## http://wiki.openwrt.org/doc/uci/wireless#wps.options
##
#Install the full wpad package
opkg update
@amitn
amitn / Yoga 2 Pro - Sensors
Created February 4, 2014 07:17
Yoga 2 Pro - Sensors
Hardware Perspective
--------------------
* It is look like that Lenovo has aggregated bunch of sensors into one USB HID Device, this will be `2047:0855 Texas Instruments`.
* This device has a big HID descriptor which report each sensor using `Usage Page 05 20 - Sensor Page (0x20)`
* There are 8 reports in the descriptor, for each report there is a bit map of the sensor properties:
```
Usage 0A 09 03 - Property: Sensor Connection Type
Usage 0A 16 03 - Property: Reporting State
Usage 0A 19 03 - Property: Power State
@jstewart
jstewart / gist:7664823
Created November 26, 2013 19:40
Org-pomodoro notifications for OS X.
;; Needs terminal-notifier (brew install terminal-notifier)
(defun notify-osx (title message)
(call-process "terminal-notifier"
nil 0 nil
"-group" "Emacs"
"-title" title
"-sender" "org.gnu.Emacs"
"-message" message))
;; org-pomodoro mode hooks
@jbuchbinder
jbuchbinder / gorilla_auth.go
Created June 19, 2013 18:22
Gorilla mux + basic authentication from htpasswd file
package main
import (
auth "github.com/abbot/go-http-auth"
"github.com/gorilla/mux"
"log"
"net/http"
"time"
)
@lucasfais
lucasfais / gist:1207002
Created September 9, 2011 18:46
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt