Skip to content

Instantly share code, notes, and snippets.

View appcypher's full-sized avatar
:octocat:
What's up?

Stephen Akinyemi appcypher

:octocat:
What's up?
View GitHub Profile
@appcypher
appcypher / Interop.md
Created February 14, 2022 12:11
Interop JS / Wasm Call

Calling a JS Function from WebAssembly

from host import js_call

js_call("print", "Hello world!")

@appcypher
appcypher / _.md
Last active February 3, 2022 11:57
Extensions vs Apps

Extensions and Apps have access to similar system resources.

The only difference is that Apps have access to more stuff than Extensions.

Apps can draw to the Canvas for example, while Extensions cannot.

However, as for creating side panels, adding widgets, etc. Extensions have access to those.

An App can have many Extensions and an Extension can be appropriate for many Apps.

@appcypher
appcypher / _.md
Last active July 10, 2022 21:33
More Permission Types

FS:

  • Open [ path ]
  • Create
  • Write
  • Read
  • Execute
  • Delete

HTTP(EVENTS):

@appcypher
appcypher / _.md
Last active January 16, 2022 22:22
Session State

Current Method

type SessionOpenTab = {
  id: string;
  userId: string;
  tabId: string;
  focus: boolean;
  order: number;
}
@appcypher
appcypher / idea.md
Last active July 9, 2022 20:52
Giga CLI Ideas

This is stale. Check Gitlab for up-to-date ideas

Getting started

giga init --headless

This generates the following file structure

@appcypher
appcypher / patterns.md
Last active February 5, 2022 08:28
* and ** patterns

*

/apps/* =>
    positive: /apps/foo, /apps/bar
    negative: /apps/foo/, /apps/, /apps/foo/bar
    
/apps/*/qux =>
 positive: /apps/foo/qux, /apps/bar/qux
@appcypher
appcypher / tree.md
Created December 22, 2021 16:13
Sample Workspace File Tree
└── workspaces
    └── unreachable
        ├── api
        │   └── v1
        │       ├── body_json
        │       │   ├── api.yaml
        │       │   └── index.js
        │       ├── static
        │       │   ├── api.yaml
@appcypher
appcypher / auth.js
Last active December 21, 2021 08:52
Accessing the Global Scope
function main() {
const { log } = Tera;
log.info(">>> authenticating ...");
return true;
})() // Close the parens prematurely.
// Do globally things.
var leak = 5;
@appcypher
appcypher / server.rs
Last active December 18, 2021 13:49
Response Recv Issue In Http [Server Returns Empty Response]
use std::{cell::RefCell, convert::Infallible, net::SocketAddr, rc::Rc, thread};
use tokio::{
net::{TcpListener, TcpStream},
runtime::Builder,
sync::mpsc::{self, Receiver, Sender},
task::LocalSet,
};
use utilities::hyper::{
rt::Executor, server::conn::Http, service::service_fn, Body, Request, Response,
};
@appcypher
appcypher / draft.md
Created December 2, 2021 10:18
Solving HTTP Request / Response Streaming NATS

REQUEST RESPONSE STREAMING VIA NATS

TODO

  • Check error for no subscriber connected
  • code /Users/appcypher/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.14.15/src/body/to_bytes.rs

Subjects

  1. worspaces - v1.run_surl.workspaces.9ccec027-68a3-47a2-bd3d-85a9c6faebfb
  2. directives - ovsJHJmrsxbs6GaQw1JtRe