Skip to content

Instantly share code, notes, and snippets.

View h13i32maru's full-sized avatar

Ryo Maruyama h13i32maru

View GitHub Profile
@h13i32maru
h13i32maru / jasper.md
Last active May 17, 2017 00:10
Jasper - The Issue Reader for GitHub

I am Japaneses, so this post might be written with broken English. sorry

Overview

Jasper is the issue reader for GitHub/GHE. This is similar to e-mail client or RSS reader. You can read/unread management, mark star, archive issues and etc. Jasper provides the core feature called "Stream" in order to realize operation same as these client. I will explain how to use the Stream this time.

/**
* @_function
* @_name myFunc
* @param {number} p - this is p
* @return {string} this is result
*/
export default f;
@h13i32maru
h13i32maru / gist:8090689
Created December 23, 2013 01:44
GitHub APIをJSから実行するスニペット
var xhr = new XMLHttpRequest()
xhr.open('GET', 'https://api.github.com/search/repositories?q=tetris+language:assembly&sort=stars&order=desc', true);
xhr.onload = function() {
var data = JSON.parse(xhr.responseText);
console.log(data);
};
// Basic認証
//xhr.setRequestHeader('Authorization', "Basic " + btoa("USERNAME:PASSWORD"));
// Personal Access Token. アカウントセッティングから発行可能
@h13i32maru
h13i32maru / gist:7065416
Created October 20, 2013 05:37
javascript constructor
function A(){};
function B(){};
function C(){};
B.prototype = new A();
// Cのprototypeを変更しない場合は正常.
console.log(C.prototype.constructor); // C
console.log((new C()).constructor); // C