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 script fetches all color styles from a Figma team/document. | |
* | |
* Dependencies: | |
* | |
* - node-fetch | |
* | |
* Due to a limitation in the Figma /styles endpoint, we need to use a | |
* document for actually using the colors in a color grid 🙄That's why | |
* we're both fetching from /styles and /files below. |
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
import { ComponentFixture, TestBed } from '@angular/core/testing'; | |
import { ElectronService } from 'ngx-electron'; | |
import { AppComponent } from './app.component'; | |
import { FakeElectronService } from './fake-electron.service'; | |
describe('AppComponent', () => { | |
let fixture: ComponentFixture<AppComponent>; | |
let comp: AppComponent; | |
let electronService: FakeElectronService; |
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
var cheatCode = [38,38,40,40,37,39,37,39,66,65]; // Konami Cheat Code | |
Rx.Observable | |
.fromEvent(document, 'keydown') | |
.map(function(x) { return x.keyCode; }) | |
.windowWithCount(cheatCode.length, 1) | |
.flatMap(function(xs) { return xs.toArray(); }) | |
.do(function (x) { console.log(x); }) | |
.filter(function(xs) { return _.isEqual(cheatCode, xs); }) | |
.subscribe(function(x) { console.log('CHEATER!!11elf'); }); |
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
// BlockInvocation.h | |
#import <Cocoa/Cocoa.h> | |
@interface BlockInvocation : NSObject { | |
void *block; | |
} | |
-(id)initWithBlock:(void *)aBlock; |
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
var socket = null; | |
function bootstrap() { | |
// 適当な図形を描画 | |
var c = document.getElementById('mycanvas'); | |
var ctx = c.getContext('2d'); | |
ctx.globalalpha = 0.3; | |
for(var i=0; i<1000; i++) { | |
ctx.beginPath(); |