Skip to content

Instantly share code, notes, and snippets.

View jswhisperer's full-sized avatar
🕵️
For Sale... I mean open to work.

Gregory The JSWhisperer jswhisperer

🕵️
For Sale... I mean open to work.
View GitHub Profile
@jswhisperer
jswhisperer / coder.yaml
Last active November 4, 2024 01:07
coder.yaml
bind-addr: 0.0.0.0:9898
host: http://coder.localhost
auth: password
password: eweewr
cert: false
name: test
template: https://github.com/bpmct/coder-templates/tree/main/desktop-container
@jswhisperer
jswhisperer / settings.json
Created October 31, 2024 13:53
Code Server Settings
{
}
@jswhisperer
jswhisperer / tasks.json
Created October 16, 2024 17:11
open a terminal by default
{
"version": "2.0.0",
"presentation": {
"echo": false,
"reveal": "always",
"focus": true,
"panel": "dedicated",
"showReuseMessage": true
},
"tasks": [
@jswhisperer
jswhisperer / docker.md
Created September 20, 2024 20:36 — forked from FreddieOliveira/docker.md
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

@jswhisperer
jswhisperer / Android Home
Created August 26, 2024 00:35 — forked from ericaroy/Android Home
Setting Android Home on Mac
Note for me to remember how to set Android Home on Mac
Open Terminal and type in..
nano ~/.bash_profile
Add the below paths
The path should be where your android installation is located
export ANDROID_HOME=/Users/username/Library/Android/sdk
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
Save file and type in terminal...
source ~/.bash_profile
@jswhisperer
jswhisperer / GL-AR750S-EXT Slate upgrade guide.md
Last active May 30, 2024 02:30
GL-AR750S-EXT Slate upgrade guide

GL-AR750S-EXT Slate upgrade guide

Uboot guide here

  • v3.104(Uboot img) here
  • v.3.105 (sysupgrade tar through web gui local upgrade) here
  • v.3.212 (web gui system auto check upgrade) http://192.168.8.1
  • latest 3.215 beta 2 (local upgrade) source
Analysis of sampling nwjs Helper (Renderer) (pid 61391) every 1 millisecond
Process: nwjs Helper (Renderer) [61391]
Path: /Applications/Popcorn-Time 15.app/Contents/Frameworks/nwjs Framework.framework/Versions/119.0.6045.105/Helpers/nwjs Helper (Renderer).app/Contents/MacOS/nwjs Helper (Renderer)
Load Address: 0x104b80000
Identifier: nwjs Helper (Renderer)
Version: ???
Code Type: ARM64
Platform: macOS
Parent Process: ??? [1]
@jswhisperer
jswhisperer / doAwait.js
Created January 15, 2024 19:23
await without catch
const doAwait = async (promise) => {
try {
const data = await promise;
return [undefined, data];
} catch (error) {
return [error, undefined];
}
};
const [error, result] = await doAwait(myPromise);
@jswhisperer
jswhisperer / tryCatch.ts
Last active November 11, 2023 14:16
tryCatch.ts
type TryCatchProps<T> = {
tryFn: () => T;
catchFn: (error: unknown) => T;
}
function tryCatch<T>({ tryFn, catchFn }: TryCatchProps<T>): T {
try {
return tryFn();
} catch (error) {
return catchFn(error);
@jswhisperer
jswhisperer / jsonSchema.ts
Created November 3, 2023 00:38
jsonSchema.ts
const literalSchema = z.union([z.string(), z.number(), z.boolean(), z.null()]);
type Literal = z.infer<typeof literalSchema>;
type Json = Literal | { [key: string]: Json } | Json[];
const jsonSchema: z.ZodType<Json> = z.lazy(() =>
z.union([literalSchema, z.array(jsonSchema), z.record(jsonSchema)])
);
jsonSchema.parse(data);