Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Ryota Kunisada 92thunder

🏠
Working from home
View GitHub Profile
@92thunder
92thunder / create_access_ranking_with_ga.js
Last active Nov 23, 2017
Create access ranking with Google Analytics.
View create_access_ranking_with_ga.js
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 Dec 12, 2014
12/12講座問題2
View class_sort.cpp
#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 Dec 12, 2014
12/12講座問題1
View sort.cpp
#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
Node.js vs Ruby (Fibonacci number)
View fib.js
var sys = require('sys');
function fib(n) {
if (n < 2) return n;
return fib(n-2) + fib(n-1);
}
sys.print(fib(39));