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 / skip_fields.md
Created February 28, 2022 14:14
Skipping Fields in Rkyv

I'm trying t skip some fields with rkyv but I have managed to get it working yet. Frankly I don't want to think too much about it right now so I will be temporarily using bincode. I still believe in rkyv but it may not be ready yet for my use-case. I will keep it in my backlog to reimplement ser-de in rkyv.

use bytecheck::CheckBytes;
use llvm_sys::{
    target::{LLVM_InitializeNativeAsmPrinter, LLVM_InitializeNativeTarget},
    LLVMModule,
};
@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,
};