Skip to content

Instantly share code, notes, and snippets.

View rahulsprajapati's full-sized avatar
🎧
Music + Coffee + Code

Rahul Prajapati rahulsprajapati

🎧
Music + Coffee + Code
View GitHub Profile
@helen
helen / repeatable-fields-metabox.php
Created January 11, 2012 04:42
Repeating Custom Fields in a Metabox
<?
/**
* Repeatable Custom Fields in a Metabox
* Author: Helen Hou-Sandi
*
* From a bespoke system, so currently not modular - will fix soon
* Note that this particular metadata is saved as one multidimensional array (serialized)
*/
function hhs_get_sample_options() {
@ScottPhillips
ScottPhillips / .htaccess
Created February 2, 2012 04:30
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@Humoud
Humoud / regex-arabic.md
Last active April 1, 2024 03:48
Detecting arabic characters with regex.

Detect all Arabic Characters:

/[\u0600-\u06ff]|[\u0750-\u077f]|[\ufb50-\ufbc1]|[\ufbd3-\ufd3f]|[\ufd50-\ufd8f]|[\ufd92-\ufdc7]|[\ufe70-\ufefc]|[\uFDF0-\uFDFD]/

Summary:

  Arabic (0600—06FF, 225 characters)

  Arabic Supplement (0750—077F, 48 characters)
@Ritesh-patel
Ritesh-patel / pre-commit
Last active November 7, 2016 14:39
WordPress Plugin pre-commit
#!/bin/bash
# WordPress Plugin pre-commit hook
set -e
message="Checking staged changes..."
git_status_egrep='^[MARC].+'
for i; do
case "$i"
@PatelUtkarsh
PatelUtkarsh / index.js
Last active January 14, 2020 06:01
Send pushbullet msg on website hit.
addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request))
})
/**
* Respond to the request
* @param {Request} request
*/
async function handleRequest(request) {
@aerobounce
aerobounce / macOS System Preference Pane Links.md
Last active July 18, 2024 11:52
macOS System Preference Pane Links