Skip to content

Instantly share code, notes, and snippets.

View ph33nx's full-sized avatar
🥷
Cooking

Abhi ph33nx

🥷
Cooking
  • 05:50 (UTC +05:30)
View GitHub Profile
@burkeholland
burkeholland / prd.md
Created April 10, 2025 19:50
TheUrlist PRD

Project Requirements Document: The Urlist Website

The following table outlines the detailed functional requirements of The Urlist website.

Requirement ID Description User Story Expected Behavior/Outcome
FR001 Creating a New URL List As a user, I want to be able to start a new, empty list so I can begin adding URLs. The system should provide a clear way for the user to initiate the creation of a new list, potentially presenting an empty list view or an "add new list" button.
FR002 A
@mtx-z
mtx-z / wp-bootstrap5.0-pagination.php
Last active March 28, 2025 13:31
Wordpress 5.7 Bootstrap 5.0 pagination (with custom WP_Query() and global $wp_query support)
<?php
/**
* @param WP_Query|null $wp_query
* @param bool $echo
* @param array $params
*
* @return string|null
*
* Using Bootstrap 4? see https://gist.github.com/mtx-z/f95af6cc6fb562eb1a1540ca715ed928
*
@dunderrrrrr
dunderrrrrr / GeoIP Block NGINX Ubuntu 20.04.md
Created April 19, 2021 08:28
Allow or block GeoIP in Nginx on Ubuntu 20.04

GeoIP Block NGINX Ubuntu 20.04

Block or filter IPs based on location in Nginx (tested on 1.18.0) on Ubuntu 20.04.

Install Nginx modules

To make use of the geographical filtering, we must first install the Nginx GeoIP module as well as the GeoIP database containing the mappings between visitors’ IP addresses and their respective countries. To do so, let’s execute:

$ sudo apt install libnginx-mod-http-geoip geoip-database
@rahularity
rahularity / work-with-multiple-github-accounts.md
Last active April 24, 2025 08:37
How To Work With Multiple Github Accounts on your PC

How To Work With Multiple Github Accounts on a single Machine

Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.

NOTE: This logic can be extended to more than two accounts also. :)

The setup can be done in 5 easy steps:

Steps:

  • Step 1 : Create SSH keys for all accounts
  • Step 2 : Add SSH keys to SSH Agent
@naveenkrdy
naveenkrdy / AdobeAMDFix.md
Last active February 17, 2025 21:51
To fix adobe products crashes on AMD hackintosh

Adobe Crash Fix XLNC

Instructions

  1. Install needed adobe apps from adobe creative cloud.

  2. Open Terminal.

  3. Copy-paste the below command to your terminal and run it (enter password when asked).

@nfsarmento
nfsarmento / nginx-wordpress.conf
Last active March 26, 2025 13:12
Harden wordpress security nginx
############ WordPress ####################
# Disable logging for favicon and robots.txt
location = /favicon.ico {
try_files /favicon.ico @empty;
access_log off;
log_not_found off;
expires max;
}
@simlei
simlei / bt-from-win
Last active April 11, 2020 23:46
copy bluetooth pairing keys from windows for dual boot -- bash script
#!/usr/bin/env bash
#credits \& original idea: https://unix.stackexchange.com/a/255510
if [[ "$1" == "--help" ]]; then
echo usage: $0 "<WindowsPartition>/Windows/System32/config"
echo if youre already in that directory, you will still have to provide that directory. However, you may then just use \$PWD in its stead.
echo this script will read out all your paired bluetooth device keys from the windows registry and show them to you. optionally, it will drop you into VIM at the approximate location at where you will want to edit stuff. This saves you the hassle of browsing the registry by hand with the chntpw command. However, it may be a good idea to read the original stackexchange post \(see below\). This script is written for ubuntu but may work for other distributions. Good luck!
echo
echo Pain points:
@mikepruett3
mikepruett3 / shell-setup.ps1
Last active April 23, 2025 12:47
Packages to install via scoop, winget, choco, and other tools...
<#
.SYNOPSIS
Script to Initialize my custom powershell setup.
.DESCRIPTION
Script uses scoop
.NOTES
**NOTE** Will configure the Execution Policy for the "CurrentUser" to Unrestricted.
Author: Mike Pruett
Date: October 18th, 2018
@diffficult
diffficult / installing_virt_manager.md
Last active March 23, 2025 10:51
Easy instructions to get virt-manager qemuv/kvm running on Arch

Easy instructions to get QEMU/KVM and virt-manager up and running on Arch

  1. Make sure your cpu support kvm with below command:

     grep -E "(vmx|svm)" --color=always /proc/cpuinfo
    
  2. Make sure BIOS have enable “Virtualization Technology”.

  3. User access to /dev/kvm so add your account into kvm(78) group:

@rohankhudedev
rohankhudedev / opcache.ini
Last active March 14, 2025 06:20
Best Zend OpCache Settings / Tuning / Configurations
[opcache]
; Determines if Zend OPCache is enabled
opcache.enable=1
; Determines if Zend OPCache is enabled for the CLI version of PHP
;opcache.enable_cli=1
; The OPcache shared memory storage size.
opcache.memory_consumption=512