Skip to content

Instantly share code, notes, and snippets.

View p32929's full-sized avatar

Fayaz Bin Salam p32929

View GitHub Profile
@p32929
p32929 / dynamic_content_page.dart
Created December 21, 2025 09:07
Just a simple page to show some dynamic infos in flutter
// =============================================================================
// STANDALONE WIDGET - Can be shared via GitHub Gist
// =============================================================================
// This file has NO dependencies on other project files.
// Only uses Flutter SDK + common 3rd party packages.
//
// Required packages (add to pubspec.yaml):
// - http: ^1.2.2
// - url_launcher: ^6.3.1
// - package_info_plus: ^8.1.2
@p32929
p32929 / flutter_app_update_page.dart
Created December 21, 2025 09:06
A simple page to show user to update the app
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:url_launcher/url_launcher.dart';
import '../../config/app_config.dart';
import '../../services/json_cache_service.dart';
// Design colors
const _darkBg = Color(0xFF121212);
const _cardBg = Color(0xFF1E1E1E);
@p32929
p32929 / remove_user_apps.sh
Created December 18, 2025 21:54
remove all the user installed apps
#!/bin/bash
# Script to remove all user-installed apps from an Android device via ADB
# Author: Generated for Thrive project
# Usage: ./remove_android_apps.sh
echo "=================================="
echo "Android User Apps Removal Tool"
echo "=================================="
echo ""
@p32929
p32929 / statusline-command.sh
Created December 16, 2025 18:39
my claude code status line
#!/bin/bash
# Read JSON input from stdin
input=$(cat)
# Extract data from JSON
current_dir=$(echo "$input" | jq -r '.workspace.current_dir')
project_dir=$(echo "$input" | jq -r '.workspace.project_dir')
model_name=$(echo "$input" | jq -r '.model.display_name')
#!/bin/bash
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
# Check if commit message is provided
#!/usr/bin/env node
const { exec } = require('child_process');
const port = process.argv[2] || '3000';
console.log(`🔍 Checking for processes on port ${port}...`);
// Kill processes on the specified port
exec(`lsof -ti:${port}`, (error, stdout, stderr) => {
@p32929
p32929 / PuppeteerHelper.ts
Last active June 25, 2025 19:24
PuppeteerHelper.ts
// v4
import { connect } from "puppeteer-real-browser";
import fs from 'fs';
import path from 'path';
// Use the exact types from puppeteer-real-browser
type ConnectResult = Awaited<ReturnType<typeof connect>>;
type PuppeteerBrowser = ConnectResult['browser'];
type PuppeteerPage = ConnectResult['page'];
(function () {
const originalConsoleError = console.error;
const errorSocket = io(location.origin);
console.error = function () {
originalConsoleError.apply(console, arguments);
const errorText = Array.from(arguments).join(' ');
const errorInfo = {
type: 'console_error',
import { useState, useEffect } from 'react';
const breakpoints = {
// sm: 640,
// md: 768,
lg: 1024,
// xl: 1280,
};
const getBreakpoint = (width) => {
@p32929
p32929 / NoSsr.tsx
Created May 23, 2024 10:31
disable SSR on a component
import dynamic from 'next/dynamic'
import React from 'react'
const NoSsr = props => (
<React.Fragment>{props.children}</React.Fragment>
)
export default dynamic(() => Promise.resolve(NoSsr), {
ssr: false
})