Skip to content

Instantly share code, notes, and snippets.

View sharmashivanand's full-sized avatar
🎯
Focusing

Shivanand Sharma sharmashivanand

🎯
Focusing
View GitHub Profile
@sharmashivanand
sharmashivanand / install_phpcbf.sh
Last active September 24, 2025 05:37
GPT5 generated phpcbf and WPCS installer. Works as of Sept 2025
#!/usr/bin/env bash
# Install phpcbf/phpcs + WordPress Coding Standards + PHPCSExtra globally
# Focus: phpcbf-first (auto-fixing). Safe to re-run. Non-destructive.
set -euo pipefail
log() { printf "\033[1;32m==>\033[0m %s\n" "$*"; }
warn() { printf "\033[1;33m[warn]\033[0m %s\n" "$*"; }
die() { printf "\033[1;31m[err]\033[0m %s\n" "$*" >&2; exit 1; }
#!/bin/bash
# This copies files from a source folder into a destination. Date-based subfolders are created and files are copied into them.
# The Sony RX1 MTP disconnected frequently so I had to build this script to copy photographs into destination organized by date-based subfolders.
# The date is detected by the output of file modification time $(date -r).
# This script hasn't been tested with paths containing spaces or special characters. Use at your own risk!
confirm() {
# call with a prompt string or use a default
read -r -p "${1:-Are you sure? [y/N]} " response
#!/bin/sh
sudo apt-get install -y git curl wget zsh neovim htop screen
#optional
# sudo apt install openssh-server atop
# Ubuntu Samba
# sudo apt install samba system-config-samba
#sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
@sharmashivanand
sharmashivanand / adding-metaboxes-settings-page.php
Last active July 9, 2018 03:40
Adding meta-boxes to plugin settings page. (Doesn't work)
<?php
/**
* WP Malware Removal
*
* @package WP Malware Removal
* @author Shivanand Sharma
* @copyright 2018 ConverticaCommerce.Com
* @license MIT
*
* @wordpress-plugin