Skip to content

Instantly share code, notes, and snippets.

@PRMStudio
PRMStudio / gist:11084962
Last active August 29, 2015 14:00 — forked from ngharo/gist:2914037
Arduino HID
#include "UsbKeyboard.h"
#define BUTTON_PIN 12
#define BYPASS_TIMER_ISR 1
void setup() {
pinMode(BUTTON_PIN, INPUT);
digitalWrite(BUTTON_PIN, HIGH);
#if BYPASS_TIMER_ISR
TIMSK0&=!(1 << TOIE0);
#endif
}
@PRMStudio
PRMStudio / gist:11084843
Created April 19, 2014 13:44
[备忘]通过浏览器快捷链接添加到百度搜藏
参考: http://hi.baidu.com/cust_/item/f120a09b122d7fda7a7f0160
通过浏览器快捷链接进行搜藏
在浏览器的链接工具栏中增加快捷链接,点击链接即收藏当前网页。此方式适用于包括IE、Firefox在内的各种浏览器。
http://www.baidu.com/search/img/cang/null03.gif
(1)添加到百度搜藏 (不弹出新窗口) URL代码:
javascript:u=location.href;t=document.title;c = "" + (window.getSelection ? window.getSelection() : document.getSelection ? document.getSelection() : document.selection.createRange().text);location="http://cang.baidu.com/do/add?it="+encodeURIComponent(t)+"&iu="+encodeURIComponent(u)+"&dc="+encodeURIComponent(c)+"&fr=ieo"; void 0
(2)添加到百度搜藏(新窗口模式) (弹出新窗口-独立窗口) URL代码: