Skip to content

Instantly share code, notes, and snippets.

View ansarizafar's full-sized avatar

Zafar Ansari ansarizafar

View GitHub Profile
@ansarizafar
ansarizafar / FAQ.md
Created January 29, 2025 06:43 — forked from ngxson/FAQ.md
convert ARM NEON to WASM SIMD prompt

Why did you do this?

Relax, I only have one Sunday to work on idea, literally my weekend project. So I tried Deepseek to see if it can help. Surprisingly, it works and it saves me another weekend...

What is your setup?

Just chat.deepseek.com (cost = free) with prompts adapted from this gist.

Does it work in one-shot or I have to prompt it multiple times?

@ansarizafar
ansarizafar / node-modules-in-react-native.md
Created January 26, 2025 06:24 — forked from parshap/node-modules-in-react-native.md
Running Node Modules in React Native

Running Node Modules in React Native

How to use packages that depend on Node.js core modules in React Native.

See the [node-libs-react-native][node-libs-react-native] library as a convenience for implementing this method.

Node.js Core Modules

@ansarizafar
ansarizafar / usage.tsx
Created December 11, 2024 14:50 — forked from Makisuo/usage.tsx
Pglite x Drizzle Live Query
const { data: accounts } = useDrizzleLive((db) =>
db.query.accounts.findMany({
limit: 100,
with: {
institution: true,
},
}),
)
@ansarizafar
ansarizafar / realtime.js
Created January 27, 2024 16:42 — forked from heapwolf/realtime.js
socket runtime realtime demo
import { network, Encryption } from 'socket:network'
import process from 'socket:process'
import Buffer from 'socket:buffer'
import fs from 'socket:fs'
window.onload = async () => {
const peerId = await Encryption.createId()
const signingKeys = await Encryption.createKeyPair()
const clusterId = await Encryption.createClusterId('asdfasdfasdfasdfas') // change this!
@ansarizafar
ansarizafar / readme.md
Created January 12, 2024 13:21 — forked from garth/readme.md
A Yjs provider for socketsupply

You can use it the same as you do with other yjs providers, but you have to pass it a socket which can be created with someting like this:

// set the peer id
const peerId = window.localStorage.getItem('peerId') ?? (await Encryption.createId())
window.localStorage.setItem('peerId', peerId)

// set the signing keys
const keySeed = window.localStorage.getItem('keySeed') ?? createId()
@ansarizafar
ansarizafar / readme.md
Created January 12, 2024 13:21 — forked from garth/readme.md
A Yjs provider for socketsupply

You can use it the same as you do with other yjs providers, but you have to pass it a socket which can be created with someting like this:

// set the peer id
const peerId = window.localStorage.getItem('peerId') ?? (await Encryption.createId())
window.localStorage.setItem('peerId', peerId)

// set the signing keys
const keySeed = window.localStorage.getItem('keySeed') ?? createId()
@ansarizafar
ansarizafar / readme.md
Created January 12, 2024 13:21 — forked from garth/readme.md
A Yjs provider for socketsupply

You can use it the same as you do with other yjs providers, but you have to pass it a socket which can be created with someting like this:

// set the peer id
const peerId = window.localStorage.getItem('peerId') ?? (await Encryption.createId())
window.localStorage.setItem('peerId', peerId)

// set the signing keys
const keySeed = window.localStorage.getItem('keySeed') ?? createId()
@ansarizafar
ansarizafar / clutter-free-vscode.jsonc
Created January 3, 2024 13:54 — forked from kamilogorek/_screenshot.md
Clutter-free VS Code Setup
// Required Plugin: https://marketplace.visualstudio.com/items?itemName=drcika.apc-extension
// settings.json
{
// Remove left-side icons
"workbench.activityBar.location": "hidden",
// Remove bottom status bar
"workbench.statusBar.visible": false,
// Remove position indicator in the editor's scrollbar
"editor.hideCursorInOverviewRuler": true,
@ansarizafar
ansarizafar / macos-app-icon.md
Created October 16, 2023 04:04 — forked from jamieweavis/macos-app-icon.md
How to create an .icns macOS app icon
@ansarizafar
ansarizafar / macos-app-icon.md
Created October 16, 2023 04:04 — forked from jamieweavis/macos-app-icon.md
How to create an .icns macOS app icon