Skip to content

Instantly share code, notes, and snippets.

import serial
import time
class SimpliciTI:
SIZE_OF_PACKET_HEADER = 3
HW_NO_ERROR = 0x06
def __init__(self):
self.device = serial.Serial()
@jonghwanhyeon
jonghwanhyeon / DragSensor.js
Created March 22, 2013 04:49
pseudo-drag event
(function ($) {
/*
up
_________________________________
| \
| up \
|__________________ \ _ move _ move
| \ \ | \ | \
V down \ move \ V / threshold V / up
S_0 ------------> S_1 ------------> S_2 ------------> S_3 ------------> S_f
@jonghwanhyeon
jonghwanhyeon / background.js
Last active December 15, 2015 03:39
Drag to open link in new tab
chrome.extension.onConnect.addListener(function (port) {
port.onMessage.addListener(openLink);
});
var openLink = (function () {
var openers = {
tab: function (information ) {
chrome.tabs.create({
url: information.url,
active: false