- User Access Token を取得する
- それを使って長い期限のトークンを取得する
/me/accounts?access_token={long_lived_token}
- 無期限のトークンが手に入る
Discover gists
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'; | |
import {Router5, RouteNode} from 'router5'; | |
import logger from '../logger'; | |
// The set of valid sink functions includes synchronous state-affecting router functions that do not require a callback | |
// and which do not have a significant return value other than the router object itself. | |
const validSinkFuncs = ['add','addNode','canActivate','deregisterComponent','navigate','registerComponent','setOption','start','stop']; | |
function validateAndRemapSinkArgument(arg) { |
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
const Cycle = require('@cycle/core'); | |
const CycleWeb = require('@cycle/web'); | |
const makeHTTPDriver = require('@cycle/http'); | |
const h = CycleWeb.h; | |
function main(responses) { | |
const GITHUB_SEARCH_API = 'https://api.github.com/search/repositories?q='; | |
// This essentially models when search requests are supposed | |
// to happen |
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
// mock falcor Model | |
function Model(root, path) { | |
this.root = root; | |
this.path = path || []; | |
} | |
Model.prototype.bind = function(path) { | |
return new Model(this.root, this.path.concat(path)); | |
}; |
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
class Observable { | |
map(fn) { | |
if (typeof fn !== "function") | |
throw new TypeError(fn + " is not a function"); | |
let C = this.constructor[Symbol.species]; | |
return new C(observer => { |
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
function fromEvent(dom, eventName) { | |
return { | |
forEach: function(observer) { | |
var handler = (e) => { | |
observer.onNext(e); | |
}; | |
dom.addEventListener(eventName, handler); | |
// Subscription | |
return { |
Note
More information you can find on Microsoft documentation.
Tip
You can install all Visual C++ Redistributable Packages using only one command with winget! https://gist.github.com/ChuckMichael/d4221fd8681a7e962c8d37d623ff3145
- x64 8.0.61000 (EOL)
Microsoft.VCRedist.2005.x64
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
// When you click the button on the right, this program | |
// retrieves a stock quote from a stubbed method. If the | |
// button is clicked while a (stubbed/fake) network request | |
// is in-flight, then the fake request is cancelled and | |
// a new one is issued. To confirm this, press the button | |
// several times and notice that only one stock quote is | |
// returned. | |
var Task = require('task-lib'); | |
var getQuoteButton = document.getElementById('getQuote'); |
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
// When you click the button on the right, this program | |
// retrieves a stock quote from a stubbed method. If the | |
// button is clicked while a (stubbed/fake) network request | |
// is in-flight, then the fake request is cancelled and | |
// a new one is issued. To confirm this, press the button | |
// several times and notice that only one stock quote is | |
// returned. | |
var Task = require('task-lib'); | |
var getQuoteButton = document.createElement('button'); |
NewerOlder