Skip to content

Instantly share code, notes, and snippets.

View MinSomai's full-sized avatar
🇳🇵
from the land of Mountains, Nepal. Namaste!

Min Somai MinSomai

🇳🇵
from the land of Mountains, Nepal. Namaste!
View GitHub Profile
@joeblau
joeblau / subvox-prompt.md
Created November 1, 2026 00:06
subvox prompt

we want to build a prototype mac app with my airpods pros

For AirPods Pro 3, Apple exposes motion, audio, and heart-rate data to third-party developers, but not every sensor’s raw output.

1. Developer-accessible sensors

Sensor Developer access API Raw data?
Accelerometer (motion) ✅ Yes Core Motion Processed
Gyroscope / rotation ✅ Yes Core Motion Processed
@iamnolanhu
iamnolanhu / CHATGPT VERSION (GPT-4 | GPT-4.1)
Created June 18, 2025 13:39
REALITY FILTER — A LIGHTWEIGHT TOOL TO REDUCE LLM FICTION WITHOUT PROMISING PERFECTION
✅ REALITY FILTER — CHATGPT
• Never present generated, inferred, speculated, or deduced content as fact.
• If you cannot verify something directly, say:
- “I cannot verify this.”
- “I do not have access to that information.”
- “My knowledge base does not contain that.”
• Label unverified content at the start of a sentence:
- [Inference] [Speculation] [Unverified]
• Ask for clarification if information is missing. Do not guess or fill gaps.
@MinSomai
MinSomai / scalable-scraping-puppeteer-cluster.js
Last active February 23, 2025 15:49
scalable scraping with puppeteer-cluster.
// Code structure
// app.js
// router.js
// controller.js
// service.js
// implementation
// This is hosted in aws Fargate. And this is the rough worst case calculation on the resource usage.
// Fargate configuration:
@robertannett
robertannett / whitelist-blocks.php
Created May 31, 2021 14:52
Wordpress - Disable Gutenberg blocks / Whitelist Blocks
/*
** Reference: https://rudrastyh.com/gutenberg/remove-default-blocks.html
*/
add_filter( 'allowed_block_types', 'custom_allowed_block_types', 10, 2 );
function custom_allowed_block_types( $allowed_blocks, $post ) {
$allowed_blocks = array(
'core/paragraph',
@MinSomai
MinSomai / init.vim
Last active March 17, 2024 00:17
neovim config for wsl (with copy/paste using win32yank.exe) | nvim | vim
" Specify a directory for plugins
" - For Neovim: stdpath('data') . '/plugged'
" - Avoid using standard Vim directory names like 'plugin'
"
call plug#begin('C:/Users/Pravi/AppData/Local/nvim/plugged')
" Make sure you use single quotes
"
" On-demand loading "Nerdtree has config
Plug 'preservim/nerdtree' |
@vinodpandey
vinodpandey / MySql-5.6-installation guide.md
Last active March 24, 2026 07:35
Install MySQL 5.6.xx on Ubuntu 18.04 & Ubuntu 20.04

MySQL Download URL

https://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.46-linux-glibc2.12-x86_64.tar.gz

Open the terminal and follow along:

  • Uninstall any existing version of MySQL
sudo rm /var/lib/mysql/ -R
import { createStore } from 'vuex';
// The modules to import
import auth, { Store as AuthStore, State as AuthState } from './auth';
import counter, { Store as CounterStore, State as CounterState } from './counter';
// A State type with all the submodules
type State = {
auth: AuthState;
counter: CounterState;
@dlukes
dlukes / server.js
Created January 20, 2017 09:29
Pattern for using Promise-based background jobs in Node + Express.
/* A quick reminder on how to use Promises with Node and Express in order to run potentially
* time-consuming jobs asynchronously (assuming the jobs are able to run in the background thanks to
* libuv and actually return Promises).
*
* Start the server, navigate to /startjob, then refresh a few times, the job should be in progress.
* You can navigate elsewhere in the "app" in other browser tabs in the meanwhile (/). After about
* 20s, you should get a result by refreshing the tab where you originally submitted the job.
*
* I hope this pattern will be useful e.g. for processing images with the `sharp` library (see
* <http://sharp.dimens.io>).
@noelboss
noelboss / git-deployment.md
Last active September 23, 2026 12:24
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@jareware
jareware / SCSS.md
Last active September 28, 2026 09:17
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do

⇐ back to the gist-blog at jrw.fi

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso