This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is free and unencumbered software released into the public domain. | |
Anyone is free to copy, modify, publish, use, compile, sell, or | |
distribute this software, either in source code form or as a compiled | |
binary, for any purpose, commercial or non-commercial, and by any | |
means. | |
In jurisdictions that recognize copyright laws, the author or authors | |
of this software dedicate any and all copyright interest in the | |
software to the public domain. We make this dedication for the benefit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#BF4の各月ごとのプレイ時間を取得する | |
require 'bundler' | |
Bundler.require | |
EMAIL='' | |
PASSWORD='' | |
USER_ID='' #http://battlelog.battlefield.com/bf4/soldier/#{USER_NAME}/stats/#{USER_ID}/pc/の#{USER_ID}部分の数値 | |
#ログインしてCookieを取得する | |
res=RestClient.post('https://battlelog.battlefield.com:443/bf4/gate/login/',{:email=>EMAIL,:password=>PASSWORD,:submit=>'Log+in',:redirect=>''}) do |response, request, result, &block| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void setup() { | |
Serial.begin(9600) ; | |
pinMode(13, OUTPUT); | |
pinMode(2, INPUT_PULLUP); | |
} | |
unsigned long prev=0; | |
void loop() { | |
int x; | |
unsigned long current = millis(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
var express = require('express') | |
, http = require('http') | |
, path = require('path') | |
, io = require('socket.io') | |
, connect = require("express/node_modules/connect") | |
, Session = express.session.Session | |
, app = module.exports = express(); | |
//メモリストアかRedisのどちらかでセッションを保存 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
var express = require('express') | |
, http = require('http') | |
, path = require('path') | |
, io = require('socket.io') | |
, connect = require("express/node_modules/connect") | |
, Session = express.session.Session | |
, app = express(); | |
//メモリストアかRedisのどちらかでセッションを保存 |