Skip to content

Instantly share code, notes, and snippets.

View hameedullah's full-sized avatar
😄

Hameedullah Khan hameedullah

😄
View GitHub Profile
@hameedullah
hameedullah / customtaxonomydropdown.php
Created May 28, 2011 23:50
Custom Taxonomy drop downs for parents and child
<?php
/*
Plugin Name: Custom Taxonomy DropDown
Author: Hameedullah Khan
Aurhot URI: http://hameedullah.com
*/
// change this to your taxonomy
$brand_taxonomy = 'category';
@hameedullah
hameedullah / apache2.conf
Created June 9, 2011 16:58
apache configuration
#
# Based upon the NCSA server configuration files originally by Rob McCool.
#
# This is the main Apache server configuration file. It contains the
# configuration directives that give the server its instructions.
# See http://httpd.apache.org/docs/2.2/ for detailed information about
# the directives.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
@hameedullah
hameedullah / get_page_depth.php
Created June 22, 2011 06:01
Get Page Depth - Wordpress
/*
Plugin Name: get_page_depth
Author: Hameedullah Khan
Aurhor URI: http://hameedullah.com
*/
/*
* get_page_depth
* Gets the page depth, calls get_post on every iteration
*/
@hameedullah
hameedullah / cc-comment-count.php
Created July 4, 2011 14:49
Count comment print index
<?php
/*
Plugin Name: Comment Count Walker for WPSE
Author: Hameedullah Khan
Author URI: http://hameedullah.com
Version: 0.1
*/
class CC_Custom_Walker_Comment extends Walker_Comment {
@hameedullah
hameedullah / no-new-terms-taxonomy-meta-box.php
Created July 10, 2011 18:22
Modifies the behavior of the taxonomy box, forbids user from selecting terms that don't belong to taxonomy.
<?php
/*
Plugin Name: No new terms taxonomy meta box
Plugin URI: https://gist.github.com/1074801
Description: Modifies the behavior of the taxonomy box, forbids user from selecting terms that don't belong to taxonomy.
Author: Hameedullah Khan
Author URI: http://hameedullah.com
Version: 0.1
License: Do what ever you like, but don't publish it under your name without improving it.
*/
@hameedullah
hameedullah / suppress-test.php
Created November 18, 2011 08:24 — forked from mikeschinkel/suppress-test.php
Testing suppression of error using @sign
<?php
/*
TESTING:
http://programmers.stackexchange.com/questions/120378/is-error-suppression-acceptable-in-role-of-logic-mechanism/120386#120386
Elapsed Time[µseconds]
Check, Exists :
50000 - Check, Exists : 94718 (user), 342 (system)
EACH - Check, Exists : 1.89436E-6 (user), 6.84E-9 (system)
@hameedullah
hameedullah / disable-plugins-when-doing-local-dev.php
Created December 29, 2011 08:55 — forked from markjaquith/disable-plugins-when-doing-local-dev.php
Disables specified WordPress plugins when doing local development
<?php
/*
Plugin Name: Disable plugins when doing local dev
Description: If the WP_LOCAL_DEV constant is true, disables plugins that you specify
Version: 0.1
License: GPL version 2 or any later version
Author: Mark Jaquith
Author URI: http://coveredwebservices.com/
*/
#!/bin/bash
#
# git-svn-diff originally by (http://mojodna.net/2009/02/24/my-work-git-workflow.html)
# modified by [email protected]
# modified by aconway@[redacted] - handle diffs that introduce new files
# modified by [email protected] - fixes diffs that introduce new files
# modified by [email protected] - fix sed syntax issue in OS X
#
# Generate an SVN-compatible diff against the tip of the tracking branch
<!DOCTYPE html>
<html>
<head>
<title>Write New Post</title>
<link rel="stylesheet"
href="http://twitter.github.com/bootstrap/1.4.0/bootstrap.min.css">
<style type="text/css">
body {
padding-top: 60px;
}
#!/usr/bin/env python
#
# Self contained version of:
# http://github.com/dustin/py-github/blob/master/src/githubsync.py
# (simply has github.py merged into githubsync.py)
#
# Copyright (c) 2005-2008 Dustin Sallings <[email protected]>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal