Skip to content

Instantly share code, notes, and snippets.

View mitsuruog's full-sized avatar
🏄‍♂️
Surfing

Mitsuru Ogawa mitsuruog

🏄‍♂️
Surfing
View GitHub Profile
@mitsuruog
mitsuruog / DOMEvent0.html
Created August 4, 2012 17:20
To disable if click the button twice
<form action="next.html" name="frm" id="frm">
<input type="text" id="id"/>
<input type="submit" id="submit" onClick="return false;">
</form>
@mitsuruog
mitsuruog / css3_3D_1.html
Created August 28, 2012 14:08
CSS3 use 3D Sample1
<style type="text/css">
div.content-3d{
top: 10px;
left: 10px;
position: relative;
}
div.content-3d div{
float: left;
opacity: 0.7;
position: absolute;
@mitsuruog
mitsuruog / Capture.java
Created September 3, 2012 09:40
Selenium2 Capture Sample
private WebDriver driver;
protected void capture(String path) throws IOException {
WebDriver driver = this.driver;
if (driver instanceof HtmlUnitDriver) {
return;
} else if (driver instanceof RemoteWebDriver) {
driver = new Augmenter().augment(this.driver);
} else {
// 何もしない
}
@mitsuruog
mitsuruog / gist:3807195
Created September 30, 2012 15:37
nodejitsu deploy error
C:\hoehoe>jitsu deploy
info: Welcome to Nodejitsu mitsuruog
info: jitsu v0.9.8
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Skipping require-analyzer because noanalyze option is set
info: Skipping require-analyzer because noanalyze option is set
warn: Local package version appears to be old
warn: The package.json version will be incremented automatically
warn: About to write C:hoehoe\package.json
{
"log": {
"version": "1.2",
"creator": {
"name": "WebInspector",
"version": "537.4"
},
"pages": [
{
"startedDateTime": "2012-10-02T01:31:17.326Z",
@mitsuruog
mitsuruog / gist:3840397
Created October 5, 2012 15:10
Arduino flashing LED
#define LED_PIN 13
void setup(){
pinMode(LED_PIN, OUTPUT);
}
void loop(){
digitalWrite(LED_PIN, HIGH);
delay(500);
digitalWrite(LED_PIN, LOW);
@mitsuruog
mitsuruog / gist:3840478
Created October 5, 2012 15:25
Arduino Serial connection
#define LED_PIN 13
void setup(){
pinMode(LED_PIN, OUTPUT);
Serial.begin(9600);
}
void loop(){
int input;
input = Serial.read();
@mitsuruog
mitsuruog / gist:3848847
Created October 7, 2012 16:33
Arduino cross flashing LED
#define LED_PIN1 10
#define LED_PIN2 9
void setup(){
pinMode(LED_PIN1, OUTPUT);
pinMode(LED_PIN2, OUTPUT);
}
void loop(){
digitalWrite(LED_PIN1, HIGH);
@mitsuruog
mitsuruog / gist:3848886
Created October 7, 2012 16:43
Arduino LED PWM sample
#define LED_PIN1 10
#define LED_PIN2 9
void setup(){
pinMode(LED_PIN1, OUTPUT);
pinMode(LED_PIN2, OUTPUT);
}
void loop(){
analogWrite(LED_PIN1, 255);
@mitsuruog
mitsuruog / gist:3905544
Created October 17, 2012 13:33
websocketプロトコルがブロックされた時のHeader
Request URL:ws://wsping.jit.su/socket.io/1/websocket/dL7NXuBCnWhqnZMPAYkU
Request Method:GET
Status Code:101 Switching Protocols
Request Headersview source
Connection:Upgrade
Host:wsping.jit.su
Origin:http://wsping.jit.su
Sec-WebSocket-Extensions:x-webkit-deflate-frame
Sec-WebSocket-Key:4EjkGu1WajTwi0MOvQjOyw==
Sec-WebSocket-Version:13