Skip to content

Instantly share code, notes, and snippets.

Brajesh Singh sbrajesh

Block or report user

Report or block sbrajesh

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@necolas
necolas / snippet.js
Created Jun 14, 2011
Optimised async loading of cross-domain scripts
View snippet.js
/*
* Updated to use the function-based method described in http://www.phpied.com/social-button-bffs/
* Better handling of scripts without supplied ids.
*
* N.B. Be sure to include Google Analytics's _gaq and Facebook's fbAsyncInit prior to this function.
*/
(function(doc, script) {
var js,
fjs = doc.getElementsByTagName(script)[0],
@johnbillion
johnbillion / wp_mail.md
Last active Aug 30, 2019
WordPress Emails
View wp_mail.md

WordPress Emails

This document lists all the situations where WordPress sends an email, along with how to filter or disable each email.

This documentation has moved here: https://github.com/johnbillion/wp_mail

@gsivaprabu
gsivaprabu / tblcitylist.sql
Created Apr 8, 2013
MySQL database of Indian Cities and states,latitude and longitude..
View tblcitylist.sql
-- phpMyAdmin SQL Dump
-- version 3.5.2.2
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Apr 08, 2013 at 02:48 PM
-- Server version: 5.5.27
-- PHP Version: 5.4.7
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
@JimWestergren
JimWestergren / index-with-redis.php
Last active Jun 27, 2019
Redis as a Frontend Cache for WordPress
View index-with-redis.php
<?php
/*
Author: Jim Westergren & Jeedo Aquino
File: index-with-redis.php
Updated: 2012-10-25
This is a redis caching system for wordpress.
see more here: www.jimwestergren.com/wordpress-with-redis-as-a-frontend-cache/
@ghprod
ghprod / laravel.js
Last active Oct 5, 2018 — forked from soufianeEL/laravel.js
You use Laravel 5 and you want to send a DELETE request without creating a form? This will handle the form-creation bits for you dynamically, similar to the Rails implementation. To use, import script, and create a link with the `data-method="DELETE"` and `data-token="{{csrf_token()}}"` attributes.
View laravel.js
/*
Taken from: https://gist.github.com/soufianeEL/3f8483f0f3dc9e3ec5d9
Modified by Ferri Sutanto
- use promise for verifyConfirm
Examples :
<a href="posts/2" data-method="delete" data-token="{{csrf_token()}}">
- Or, request confirmation in the process -
<a href="posts/2" data-method="delete" data-token="{{csrf_token()}}" data-confirm="Are you sure?">
@sbrajesh
sbrajesh / copy-png-files.php
Created Aug 17, 2016
Copy png files from the directory recursively to the destination directory
View copy-png-files.php
<?php
/** Copy PNG files from the Source Directory( and its child directories) to destination as specified
*
* I use it to move all the png files from the extracted subtle patterns directories to another directory
*
* @param string $path the directory which contains our subdirectories
* @param string $destination_dir the absolute path to directory where files will be moved
*/
function copy_png_files( $path, $destination_dir ) {
@boonebgorges
boonebgorges / gist:5057165
Created Feb 28, 2013
Hide WordPress plugins from the plugins.php admin screen in a flexible way
View gist:5057165
<?php
/**
* Prevent specific plugins from being activated (or, in some cases, deactivated).
*
* Plugins that are to be deprecated should be added to the $disabled_plugins array.
*
* Plugins that should be un-deactivatable should be added to the $undeactivatable_plugins array
*/
function cac_hide_plugins( $plugins ) {
You can’t perform that action at this time.