Skip to content

Instantly share code, notes, and snippets.

View jjoaquim's full-sized avatar
💭
If something isn’t broke, fix it ’til it is.

José Carlos Joaquim jjoaquim

💭
If something isn’t broke, fix it ’til it is.
View GitHub Profile
@mchiang0610
mchiang0610 / benchmark.py
Last active October 25, 2025 07:46
script used in NVIDIA DGX Spark performance blog post
# /// script
# dependencies = [
# "ollama",
# ]
# ///
import os
import sys
import time
from argparse import ArgumentParser, FileType
@ngxson
ngxson / FAQ.md
Last active August 5, 2025 17:29
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?

@awni
awni / mlx_distributed_deepseek.md
Last active October 6, 2025 13:50
Run DeepSeek R1 or V3 with MLX Distributed

Setup

On every machine in the cluster install openmpi and mlx-lm:

conda install conda-forge::openmpi
pip install -U mlx-lm

Next download the pipeline parallel run script. Download it to the same path on every machine:

@ndraiman
ndraiman / ssh_into_wsl2.md
Last active October 11, 2025 09:31
SSH Into WSL2

Guide: How to SSH Into WSL2

Install WSL2 SSH server

  1. Open your wsl ubuntu terminal

  2. install open-ssh server

    sudo apt update 

sudo apt install openssh-server

@adujardin
adujardin / clean_jetson.sh
Last active January 10, 2025 05:03
Script to remove unnecessary stuffs from the Jetson to save disk space (WIP)
# https://elinux.org/Jetson/FAQ/BSP/RootFS_Reduction#Remove_installed_deb_packages
## Step 1, safe
sudo apt update
sudo apt autoremove -y
sudo apt clean
sudo apt remove thunderbird libreoffice-* -y
## Step 2, still safe but not recommended for dev use
# samples
@ianchen06
ianchen06 / spylon-kernal.md
Created May 20, 2019 06:07
Set up spylon-kernel notebook with Spark
%%init_spark
# Configure the location of the mesos master and spark distribution on HDFS
# launcher.jars = ["/some/local/path/to/a/file.jar"]
launcher.packages = ["org.elasticsearch:elasticsearch-hadoop:6.6.0",
                     "org.apache.hadoop:hadoop-aws:2.7.5",
                     "org.apache.hadoop:hadoop-common:2.7.5",
                     "com.amazonaws:aws-java-sdk:1.7.4"]
launcher.master = "k8s://kubernetes.default"
launcher.conf.set("spark.submit.deployMode", "client")
import UIKit
import Foundation
func test(named: String,
_ work: (_ assert: @escaping (Bool) -> Void, _ done: @escaping () -> Void) -> Void) {
var testPass = true
var assertCount = 0
let assert: (Bool) -> Void = { value in
assertCount = assertCount + 1
testPass = testPass && value
@jpitchardu
jpitchardu / optional.js
Last active June 5, 2020 02:31
Optional API javascript
function optionalAccess(obj, path, def) {
const propNames = path.replace(/\]|\)/, "").split(/\.|\[|\(/);
return propNames.reduce((acc, prop) => acc[prop] || def, obj);
}
function proxyOptional(obj, evalFunc, def) {
const handler = {
get: function(target, prop, receiver) {
const res = Reflect.get(...arguments);
@Chuckytuh
Chuckytuh / embed_framework_hook.js
Created February 27, 2018 16:48
Cordova hook to embed an iOS framework that is a dependency on a cordova plugin.
// This hook expects that the framework dependency is defined on plugin.xml.
// Example:
// <platform name="ios">
// <!-- .... -->
// <framework src="path/to/FRAMEWORK_NAME.framework" custom="true" embed="true" />
// </platform>
// For the OutSystems platform it is better to add this hook on both events. As so:
// <platform name="ios">
// <!-- .... -->
// <hook type="after_plugin_install" src="path/to/thishook/embed_framework_hook.js" />
@erikyuntantyo
erikyuntantyo / react-native-offline-bundling-android
Last active October 29, 2023 06:36
Build react-native offline bundling into android
# create assets folder in the current project
$ mkdir android/app/src/main/assets
# create bundle script
$ react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/
# execute command to run android to create debug apk
$ react-native run-android
# Or change to android folder