Skip to content

Instantly share code, notes, and snippets.

@nksaraf
nksaraf / index.html
Last active May 15, 2022 11:34
sqlite-ui
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link
rel="icon"
href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🛢</text></svg>"
/>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
@nksaraf
nksaraf / devtools.tsx
Created May 11, 2022 01:07
solid-devtools
import { render } from "solid-js/web";
import type { getOwner } from "solid-js";
import {
createEffect,
createMemo,
createResource,
createSignal,
For,
Match,
@nksaraf
nksaraf / README.md
Last active November 1, 2021 22:05
devinci-os

OS for the browser

  • MacOS like interface
    • Forked from the awesome PuruVijay's macos-web
  • Full screen experience for apps
  • Cross-tab experience using service worker
  • VSCode inbuilt (real version)
  • Web assembly + WASI based OS
  • Persisted File system
@nksaraf
nksaraf / vite.config.ts
Created February 20, 2021 04:30
vite-react
import reactRefresh from "@vitejs/plugin-react-refresh";
export default {
plugins: [reactRefresh()],
};
‎‎​
@nksaraf
nksaraf / index.d.ts
Last active January 1, 2021 07:49
twind
‎‎​
@nksaraf
nksaraf / icons.tsx
Last active December 30, 2020 10:48
icons.tsx
export const LoadingIcon = (props) => {
return (
<svg
{...props}
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
>
<circle
className={tw`opacity-25`}
@nksaraf
nksaraf / error.ts
Last active December 29, 2020 23:33
fetchGraphQL.ts
/**
* Shamelessly copied from the amazing `urql` client
* https://github.com/FormidableLabs/urql/blob/main/packages/core/src/utils/error.ts
*/
import { GraphQLError } from "graphql/error/GraphQLError";
const generateErrorMessage = (
networkErr?: Error,
graphQlErrs?: GraphQLError[]
@nksaraf
nksaraf / distilt.ts
Last active December 29, 2020 13:47
distilt.js
#!/usr/bin/env node
const { existsSync, promises: fs } = require('fs')
const path = require('path')
if (require.main === module) {
main().catch((error) => {
console.error(error)
process.exit(1)
})
const shellac = require('shellac').default;
shellac`
$$ node scripts.js ${process.argv.slice(1).join(' ')}
`