Skip to content

Instantly share code, notes, and snippets.

View ivanceras's full-sized avatar
💭
Keep learning, sharpen the saw

Jovansonlee Cesar ivanceras

💭
Keep learning, sharpen the saw
View GitHub Profile
00:21:22.023 result:
Object { error: Error }
error: Error: Unknown URI resolution error while resolving URI "wrap://ipfs/QmaAs1DCQDRMVsD2zWaf7L9C6YdESKRj6cTRixJKJs6Duk"
Resolution Stack: {
"stack": [
{
"uriResolver": "RedirectsResolver",
"sourceUri": {
"_config": {
@ivanceras
ivanceras / index.html
Created April 12, 2022 15:18
Index page
<html>
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type"/>
<title>Counter</title>
<style type="text/css">
body { font-family: verdana, arial, monospace; }
main {
width:30px;
height: 100px;
margin:auto;
@ivanceras
ivanceras / lib.rs
Created April 12, 2022 15:13
wasm bindgen start
#[wasm_bindgen(start)]
pub fn start() {
Program::mount_to_body(App::new());
}
@ivanceras
ivanceras / lib.rs
Created April 12, 2022 14:56
Application trait
impl Application<Msg> for App {
fn view(&self) -> Node<Msg> {
node! {
<main>
<input type="button"
value="+"
on_click=|_| {
Msg::Increment
}
/>
enum Msg {
Increment,
Decrement,
Reset,
}
@ivanceras
ivanceras / lib.rs
Created April 12, 2022 14:47
Model definition
use sauron::prelude::*;
struct App {
count: i32,
}
impl App {
fn new() -> Self {
App { count: 0 }
}
@ivanceras
ivanceras / Cargo.toml
Created April 12, 2022 14:12
Package definition template
[package]
name = "counter"
version = "0.1.0"
edition = "2021"
[dependencies]
@ivanceras
ivanceras / Cargo.toml
Created April 12, 2022 13:56
Package definition
[package]
name = "counter"
version = "0.1.0"
edition = "2018"
[lib]
crate-type = ["cdylib"]
[dependencies]
sauron = "0.49"

Keybase proof

I hereby claim:

  • I am ivanceras on github.
  • I am ivanceras (https://keybase.io/ivanceras) on keybase.
  • I have a public key whose fingerprint is 5C21 6619 48C4 53C2 A0D7 80C2 7335 45D5 7432 2528

To claim this, I am signing this object:

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.