2013-03-18 にQiitaに投稿した記事のアーカイブです。
--Replace Evernote Notes Title
--Copyright © 2013 armorik83
on run
tell application "Evernote"
activate| import Dexie from 'dexie'; | |
| const dbName = 'dexie-suburi'; | |
| const dbVer = 2; | |
| window.indexedDB.deleteDatabase(dbName); | |
| const dexieDb = new Dexie(dbName); | |
| dexieDb.version(dbVer).stores({ | |
| user: '++id,name', |
| ObjC.import('Foundation'); | |
| var app = Application.currentApplication(); | |
| app.includeStandardAdditions = true; | |
| var path = app.chooseFile(); | |
| var pipe = $.NSPipe.pipe; | |
| var file = pipe.fileHandleForReading; // NSFileHandle | |
| var task = $.NSTask.alloc.init; |
| import { Component } from '@angular/core'; | |
| class Hero { | |
| id: number; | |
| name: string; | |
| } | |
| @Component({ | |
| selector: 'my-app', | |
| template: ` |
| import {Observable, Subject} from 'rxjs' | |
| // # 材料 | |
| // ## ご飯 | |
| class ご飯 { | |
| freeze() { | |
| this.温度 = -10 | |
| return this | |
| } |
| import * as ts from 'typescript'; | |
| import * as Lint from 'tslint'; | |
| import { EnforceNamingWalker } from './enforceNamingBase'; | |
| export class Rule extends Lint.Rules.AbstractRule { | |
| static FAILURE_STRING = `It is a method that returns Observable, use '*$' suffix`; | |
| apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] { |
| const _statements = [ | |
| `class_implements 'Foo' and includes 'Bar' then error`, | |
| `class_extends 'BaseMediator' and import 'component' then error`, | |
| `method_returns 'Observable' and not name_matches '\\$$' then warn`, | |
| `class_implements 'Foo' and includes 'Bar' then error`, | |
| ]; | |
| // noprotect | |
| const f = statements => { | |
| console.log('==============================='); |
| #[derive(Debug)] | |
| struct Parser { | |
| cursor: Cursor, | |
| tokens: Vec<String>, | |
| } | |
| impl Parser { | |
| pub fn new(cursor: Cursor) -> Parser { | |
| Parser { cursor, tokens: Vec::new()} | |
| } |
| import { kk } from './emitter'; | |
| /** | |
| * AoT のために export function での宣言が必須。 | |
| */ | |
| /* tslint:disable:only-arrow-functions */ | |
| export function KukerComponent() { | |
| return cls => { | |
| const componentRole = cls.__proto__.name.includes('DecisionMaker') | |
| ? 'DecisionMaker' |
| const prepareRetina = (el, dpr) => { | |
| el.width *= dpr; | |
| el.height *= dpr; | |
| el.style.width = `${el.width / dpr}px`; | |
| el.style.height = `${el.height / dpr}px`; | |
| }; | |
| const render = () => { | |
| const canvasEl = document.querySelector('canvas'); | |
| const dpr = window.devicePixelRatio; |
2013-03-18 にQiitaに投稿した記事のアーカイブです。
--Replace Evernote Notes Title
--Copyright © 2013 armorik83
on run
tell application "Evernote"
activate