Skip to content

Instantly share code, notes, and snippets.

View aslamdoctor's full-sized avatar

Aslam Doctor aslamdoctor

View GitHub Profile
@aslamdoctor
aslamdoctor / speed-up-claude-code-cli-tools.md
Created March 11, 2026 08:54 — forked from cynthiateeters/speed-up-claude-code-cli-tools.md
Speed up Claude Code with modern CLI tools (bun, ripgrep, fd, sd, jq, parallel)

Speed up Claude Code with modern CLI tools

Claude Code runs shell commands constantly — finding files, searching code, processing JSON, running scripts. The default Unix tools (find, grep, sed, node) work, but modern replacements written in Rust and Zig are significantly faster.

Installing these tools and telling Claude Code to prefer them can noticeably speed up your workflow.

The tools

Default tool Modern replacement Speedup Purpose
@aslamdoctor
aslamdoctor / del_vscode_mac.md
Created September 25, 2024 16:32 — forked from karansinghgit/del_vscode_mac.md
How to completely uninstall VSCode on Mac
  1. Close and Quit VSCode

  2. Remove VScode from Applications (just go to Finder -> Applications and move VSCode to Bin)

  3. Execute these commands in any order. The paths might be slightly different for you.

rm -fr ~/.vscode*
rm -fr ~/Library/Application\ Support/Code/

rm -fr ~/Library/Saved\ Application\ State/com.microsoft.VSCode.savedState/
rm -fr ~/Library/Preferences/com.microsoft.VSCode.helper.plist 
@aslamdoctor
aslamdoctor / steps.md
Created May 4, 2024 14:35
Switch PHP version on Mac using Brew
  1. Check if grep is installed

grep --version

If it returns below

grep (BSD grep, GNU compatible) 2.6.0-FreeBSD

  1. Then install it using brew
@aslamdoctor
aslamdoctor / fix-mobile-nav-height.js
Created April 5, 2024 20:33
Fix 100vh issue on mobile
// First we get the viewport height and we multiple it by 1% to get a value for a vh unit
let vh = window.innerHeight * 0.01;
// Then we set the value in the --vh custom property to the root of the document
document.documentElement.style.setProperty('--vh', `${vh}px`);
// We listen to the resize event
window.addEventListener('resize', () => {
// We execute the same script as before
let vh = window.innerHeight * 0.01;
document.documentElement.style.setProperty('--vh', `${vh}px`);
@aslamdoctor
aslamdoctor / cookieHelper.js
Created February 20, 2024 16:30
Javascript Cookie Helper
// Cookie helper functions
const CookieHelper = {
/**
* Set Cookie.
*
* @param {string} name
* @param {string} value
* @param {string} minutes
*/
setCookie( name, value, minutes ) {
server {
listen 80;
listen [::]:80;
server_name mysite.local;
location / {
proxy_pass http://localhost:3000/;
}
}
@aslamdoctor
aslamdoctor / settings.json
Last active April 19, 2023 07:51
PHPCBF VSCode Settings for WordPress
# For Normal Theme
{
"phpsab.standard": "WordPress",
"phpsab.executablePathCBF": "/Users/aslamdoctor/.composer/vendor/bin/phpcbf",
"editor.formatOnSave": true,
"scss.validate": false,
"[javascriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
@aslamdoctor
aslamdoctor / wp-delete-spam-users.php
Created January 17, 2023 09:03
Delete Spam Users from WordPress
<?php
add_action(
'init',
function() {
if ( isset( $_GET['cleanup_spams'] ) ) {
global $wpdb;
$query = "SELECT *
FROM $wpdb->users
WHERE user_email LIKE '%.be'";
$users = $wpdb->get_results( $query );
@aslamdoctor
aslamdoctor / coordinatestoname.js
Created December 27, 2022 03:26 — forked from AmirHossein/coordinatestoname.js
Get City and Country name by coordinates via Google Maps api
// Demo: http://jsfiddle.net/xuyp8qb5/
// Note: You need Google Map API Key to run demo; bit.ly/2pBgToW
var latlng;
latlng = new google.maps.LatLng(40.730885, -73.997383); // New York, US
//latlng = new google.maps.LatLng(37.990849233935194, 23.738339349999933); // Athens, GR
//latlng = new google.maps.LatLng(48.8567, 2.3508); // Paris, FR
//latlng = new google.maps.LatLng(47.98247572667902, -102.49018710000001); // New Town, US
//latlng = new google.maps.LatLng(35.44448406385493, 50.99001635390618); // Parand, Tehran, IR
//latlng = new google.maps.LatLng(34.66431108560504, 50.89113940078118); // Saveh, Markazi, IR
// Get The Page ID You Need
get_option( 'woocommerce_shop_page_id' );
get_option( 'woocommerce_cart_page_id' );
get_option( 'woocommerce_checkout_page_id' );
get_option( 'woocommerce_pay_page_id' );
get_option( 'woocommerce_thanks_page_id' );
get_option( 'woocommerce_myaccount_page_id' );
get_option( 'woocommerce_edit_address_page_id' );
get_option( 'woocommerce_view_order_page_id' );
get_option( 'woocommerce_terms_page_id' );