Skip to content

Instantly share code, notes, and snippets.

View 92thunder's full-sized avatar
🏠
Working from home

Ryota Kunisada 92thunder

🏠
Working from home
View GitHub Profile
@92thunder
92thunder / create_access_ranking_with_ga.js
Last active November 23, 2017 00:26
Create access ranking with Google Analytics.
const google = require('googleapis');
const analytics = google.analyticsreporting('v4');
const mysql = require('mysql');
require('date-utils');
exports.handler = (event, context, callback) => {
// MySQL Setting
var rdsConnection = mysql.createConnection({
host: '<DB Host>',
@92thunder
92thunder / class_sort.cpp
Created December 12, 2014 15:50
12/12講座問題2
#include <stdio.h>
#include <algorithm>
using namespace std;
class Student {
public:
char name;
int math, eng;
bool operator < (const Student &s ) const {
if(math == s.math)
@92thunder
92thunder / sort.cpp
Created December 12, 2014 15:38
12/12講座問題1
#include <stdio.h>
#include <algorithm>
using namespace std;
int main() {
int array[5] = { 4, 1, 2, 5, 3 };
sort(array, array + 5);
for( int i = 0; i < 5; i++ ) {
@92thunder
92thunder / fib.js
Created May 27, 2014 05:39
Node.js vs Ruby (Fibonacci number)
var sys = require('sys');
function fib(n) {
if (n < 2) return n;
return fib(n-2) + fib(n-1);
}
sys.print(fib(39));