Skip to content

Instantly share code, notes, and snippets.

🐶
Working from home

aiya000 aiya000

🐶
Working from home
Block or report user

Report or block aiya000

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View scratch38.md
  • 前提
    • ユーザーをauthenticationにログインさせるために、authenticationへのパスワードYが必要
    • でもYは直接、僕らの手に保存したくない!
  1. ユーザーが入力したパスワードにある暗号化アルゴリズムfとsoltをかけて、パスワードXを作る
  2. firestoreにXを保存する
  3. XにfをM回かけて、パスワードYを作る
    • Xは僕らが管理するので、人間的ミスなどで漏れる可能性がある
  4. authenticationにYを登録する
    • YはGoogleが管理してくれるので、漏れない(漏れたらGoogleのせい)
View test.vim
" Test for template strings $'${x} ${y.z}' $"$var"
scriptencoding utf-8
func Test_template_string_basic() abort
endfunc
func Test_template_string_appendix() abort
endfunc
View scratch51.md

const x: 'a' | 'b' = 'b' 'use strict' const y: 'a' = x as 'a' undefined y 'b'

View Test.vue
<template>
<Label text="hi" />
</template>
<script lang="ts">
// a
// a
// a
// a
// a
@aiya000
aiya000 / Observable.ts
Last active Jul 11, 2019
Allows to decide take's type
View Observable.ts
import * as Untyped from 'tns-core-modules/data/observable'
import deprecated from 'deprecated-decorator' // npm install --save-dev deprecated-decorator
import { Field, BooleanT, True, False } from '@/data/types'
/**
* Don't dirty your hands.
* You must use this instead of [[Untyped.Observable]].
*
* This description is [here](http://aiya000.github.io/posts/2019-07-04-recover-nativescript-type-unsafe-observable.html).
*/
@aiya000
aiya000 / Observable.ts
Last active Jul 8, 2019
Typgin NativeScript's untyped Observable
View Observable.ts
import * as Untyped from 'tns-core-modules/data/observable'
import deprecated from 'deprecated-decorator' // npm install --save-dev deprecated-decorator
import { Field } from '@/data/conditional-types'
/**
* Don't dirty your hands.
* You must use this instead of [[Untyped.Observable]].
*
* This description is [here](http://aiya000.github.io/posts/2019-07-04-recover-nativescript-type-unsafe-observable.html).
*/
View Test.ts
import deprecated from 'deprecated-decorator'
class Untyped {
public set(_: string, __: any): void { }
}
class Typed<T extends object> extends Untyped {
public assign(x: AFieldOf<T>, __: Typed[x]) { } // 依存型させてぇ!
@deprecated('assign')
View Test.ts
let x: (10 + 1) = 11
console.log(x)
You can’t perform that action at this time.