Skip to content

Instantly share code, notes, and snippets.

View Noitidart's full-sized avatar

Noitidart Noitidart

View GitHub Profile
@Noitidart
Noitidart / 00_issue-hijri-date-fix.md
Created June 2, 2026 16:48
Issue #611 - Hijri Date Fix (The-Masjid-App)

Hijri date fix

Author: ridwanrizri Date: 2023-03-31

When our unadjusted date is showing Ramadan 1, masjid admins need to set it to Shaban 30. But our hijri date system won't let them go back to Shaban 30. The issue is our calculation says Shaban is 29 days this year, but we want masjids to be able to override this and set it to Shaban 30.

The other problem is masjids have to do this right around maghrib the evening before — that's when they know if the moon was sighted or not. The most common case is the moon was or wasn't sighted, so right after maghrib they have to come adjust. But there's also a case where masjids go by a calculation that differs from ours, so they want to adjust ahead of time. To keep it simple, we may want to only let them adjust for one month, not plan months in the future.

@Noitidart
Noitidart / README.md
Last active May 15, 2026 06:47
Run local opencode changes in VS Code integrated terminal so the tab renames to 'opencode' (not 'bun') — required for the IDE extension (cmd+opt+k) to detect the running CLI. See https://opencode.ai/docs/ide/

Run local opencode in VS Code integrated terminal

VS Code renames terminal tabs to match the foreground process name. If the tab shows bun instead of opencode, the IDE extension (cmd+opt+k) won't detect the running CLI. This setup fixes that.

Setup

  1. Install bun (if not already):
@Noitidart
Noitidart / .gitignore
Last active May 25, 2026 15:56
Difftastic Git Shortcuts — structural diff aliases (gdu, gds, gdh, gdb, gdr, gl, glo)
.DS_Store
import * as FileSystem from 'expo-file-system';
import { Platform } from 'react-native';
import { IStorageEngine } from 'lib/persistoid';
import { addDebugBreadcrumb, addErrorBreadcrumb } from 'lib/sentry';
function isAndroidMissingFileOrDirectoryError(error: unknown) {
if (
Platform.OS === 'android' &&
hasMessage(error) &&
{
"editor.inlineSuggest.enabled": true,
"github.copilot.enable": {
"*": false,
"plaintext": false,
"markdown": false,
"scminput": false,
"ts": true,
"js": true,
"jsx": true,
@Noitidart
Noitidart / useRadio.ts
Created April 8, 2022 23:49
maybe useful maybe not. i made but never used it.
import { useMemo, useRef } from 'react';
import { useMemoizedFn } from 'ahooks';
import { noop } from 'lodash';
type UseRadioInputs = {
// Defaults to undefined
defaultValue?: any;
onChange?: (value: any) => void;
1. yarn add --dev detox jest-circus
2. detox init -r jest (This creates the e2e folder along with the .detoxrc.json)
3. yarn add --dev eslint-plugin-detox (optional)
plugins: [...'detox'...],
- Add this to your eslint config plugins
4.Make sure your your **eas.json** has a simulator build set up that looks like this then create a simulator release build by running: **eas build --profile simulator --platform ios**
"simulator": {
"ios": {
"simulator": true,
Cu.import('resource://gre/modules/ctypes.jsm');
const cg = ctypes.open('/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics');
const CFTimeInterval = ctypes.double;
const CGEventSourceStateID = ctypes.uint32_t;
const CGEventType = ctypes.uint32_t;
const kCGEventSourceStateCombinedSessionState = 0;
const kCGAnyInputEventType = 0xFFFFFFFF;