Skip to content

Instantly share code, notes, and snippets.

View nphsu's full-sized avatar
🏆
Focusing

S nphsu

🏆
Focusing
  • Singapore
View GitHub Profile
@nphsu
nphsu / spec.md
Created January 4, 2022 07:15
Crowdfundr Spec

Specifications

Day1 Requirements

Build a smart contract that allows creators to register their projects. Other people can contribute ETH to that project. Once the goal has been met, the creators can withdraw the funds. When someone contributes 1 ETH, they receive a contributor badge NFT, which is tradable.

Specs that is my understanding

  • Anyone can launch a project to raise funds by ETH.
    • cannot be funded with any ERC20s.
    • can launch projects multiple times as another project.
  • Anyone can pay ETH to any projects.
@nphsu
nphsu / CheatSheet.md
Last active March 23, 2020 02:58
Cheat sheet

32603

It is occured if the specific data didn't exist.

For instance, there are some mappings. if you want to get storage data of a contract, and if the data of a specific index did't exist, you can see this error.

address[] myaddresses;

WebAssembly is at best when considered as a supplement to JavaScript - filling in when JavaScript isn't quite performant enough.

WebAssembly can be used to write entire web applications or to replace small bits of existing applications that might not be performant enough with something that runs at near native speed.

These languages(C#,Go) have large runtimes that must be included in the WebAssembly binary, they're only really practical for greenfield projects.

※the smallest achievable binary size uncompressed is around 2MB; this mirrors what I've seen. For Rust, which ships with an extremely minimal runtime (basically just an allocator), the "hello, world" example compiles to 1.6KB

This is my portfolio page. Each topics I am interesting are linked to created profucts or articles.

Cloud

AWS

GCP

Blockchain

Ethereum

STO

Ethereumのトークンが可能にするゲーム化された世界観の構築

68747470733a2f2f707261676d612d63757272792e636f6d2f77702f77702d636f6e74656e742f75706c6f6164732f323031382f30372f457468657265756d2e706e67

Ethereumは、今最もDapps開発で利用されているプラットフォームです。Dappsとは分散型アプリケーションの略称で、ブロックチェーン上にアプリケーションを配置する(デプロイする)ことで、中央管理者が不要なシステム構築を可能にしています。例えば、"トークン"と呼ばれる仮想通貨は、Ethereum上のDappsとして作成されているケースが多いです。

なぜEthereum上のDappsで多くの通貨が作成されているのでしょうか。それは、ERCと呼ばれる共通規格が他のプラットフォームに先んじて整備されていることが理由の1つでしょう。

ERCとはEthereum Request for Commentsの略称で、Ethereumに関連する技術仕様の提案書を指します。Ethereumのコミュニティは他のブロックチェーンコミュニティに比べ活発であるため、現在までに多くのERCが議論されています。

1章 Dockerの復習

Dockerコンテナの設計

  • 1コンテナにつき1プロセス
  • Immutable Infrastructureなイメージにする
  • 軽量なDockerイメージにする
    • yumやaptでパッケージをインストールした後のキャッシュファイルやリポジトリのパッケージリストなどの削除
    • Alpine Linuxなど軽量なディストリビューションを利用する
  • 実行ユーザをroot以外にする
@nphsu
nphsu / file0.swift
Last active November 26, 2017 11:26
【Swift】Google Map API for iOSを使用してみた ref: https://qiita.com/shunp/items/f8b03f3a35a3ee5b444f
import UIKit
import GoogleMaps
class DemoViewController:UIViewController {
override func loadView() {
let camera = GMSCameraPosition.camera(withLatitude:1.285, longitude:103.848, zoom:12)
let mapView = GMSMapView.map(withFrame: .zero, camera: camera)
self.view = mapView
}
}
@nphsu
nphsu / sample.swift
Last active November 15, 2017 17:18
【ARKit】ARでVR空間を作成する ref: https://qiita.com/shunp/items/aed9235781c9e44acfd2
SCNNode node1 = SCNNode()
SCNNode node2 = SCNNode()
SCNNode node3 = SCNNode()
node1.renderingOrder = 100 // 1番目
node2.renderingOrder = 300 // 3番目
node3.renderingOrder = 200 // 2番目