Skip to content

Instantly share code, notes, and snippets.

View morishin's full-sized avatar
🦍
ウホホ

Shintaro Morikawa morishin

🦍
ウホホ
View GitHub Profile
@morishin
morishin / left-align-stack-view.png
Last active March 22, 2024 00:25
Align to Left the contents of UIStackView
left-align-stack-view.png
@morishin
morishin / currency.1m.js
Last active January 30, 2018 03:35
BitBar Plugin - Show Crypt Currency Rates to JPY
#!/usr/bin/env /path/to/the/node/executable
const https = require('https')
const Currency = {
Bitcoin: 'btc',
Ethereum: 'eth',
EthereumClassic: 'etc',
Lisk: 'lsk',
Factom: 'fct',
@morishin
morishin / spv.md
Last active December 22, 2017 17:08

※図は Mastering Bitcoin (PDF) からの引用

SPV (Simplified Payment Verification) を支える技術

Bitcoin クライアントの種類

node_types

UTXO (Unspent Transaction Output)

  • ビットコインウォレットの残高は、ビットコインネットワークから自分のビットコインアドレスが output になっているトランザクションの情報 UTXO (Unspent Transaction Output) を集めて金額を合計したもの
  • ビットコインで支払うぞってなったら、集めて使おうとしてる UTXO が本当にまだ使われてないかをチェックする必要がある
  • UTXO が使われていないかどうかの検証は、そのトランザクションより下の全てのブロックに含まれる全てのトランザクションをチェックする
  • 全部集めるにはブロックチェーン全部をダウンロードして探索しないといけない?
import * as React from 'react';
import { KeyboardAvoidingView, KeyboardAvoidingViewProps, Platform, View } from 'react-native';
export default class _KeyboardAvoidingView extends React.Component<KeyboardAvoidingViewProps, {}> {
render() {
if (Platform.OS === 'ios') {
return <KeyboardAvoidingView {...this.props} />;
} else {
return <View {...this.props} />;
}
import { AsyncStorage } from 'react-native';
export default class GenericAsyncStorage {
static async getItem<T>(key: string, callback?: (error?: Error, result?: T) => void): Promise<T> {
const item = await AsyncStorage.getItem(key);
return JSON.parse(item);
}
static async setItem<T>(
key: string,
protocol Pokemon {
associatedtype PokemonType
var name: String { get }
var type: PokemonType { get }
}
struct Electric {
// something
}
import UIKit
import PlaygroundSupport
let stackView = UIStackView()
stackView.distribution = .equalSpacing
stackView.alignment = .center
stackView.translatesAutoresizingMaskIntoConstraints = false
let bg = UIView(frame: CGRect(x: 0, y: 0, width: 500, height: 500))
bg.backgroundColor = .lightGray
$ docker run --rm theyahya/sherlock morishin
."""-.
/ \
____ _ _ _ | _..--'-.
/ ___|| |__ ___ _ __| | ___ ___| |__ >.`__.-""\;"`
\___ \| '_ \ / _ \ '__| |/ _ \ / __| |/ / / /( ^\
___) | | | | __/ | | | (_) | (__| < '-`) =|-.
|____/|_| |_|\___|_| |_|\___/ \___|_|\_\ /`--.'--' \ .-.
.'`-._ `.\ | J /
/ `--.| \__/

🎉🎉🎉 Welcome @rrreeeyyy & @devefox !!! 🎉🎉🎉

  • プロジェクト概要、メンバー
  • フェーズ1概要、Principle、Figma

7/16~19週

ゴール

  • 開発メンバーがプロジェクトの現状を理解する
struct FNV1A {
static let FNVOffsetBasis: UInt = 14695981039346656037
static let FNVPrime: UInt = 1099511628211
static func digest(of source: String) -> UInt {
var hash = FNVOffsetBasis
for byte in [UInt8](source.utf8) {
hash ^= UInt(byte)
hash &*= FNVPrime
}