Skip to content

Instantly share code, notes, and snippets.

View hameedullah's full-sized avatar
😄

Hameedullah Khan hameedullah

😄
View GitHub Profile
@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 / 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
node "submitz" inherits default {
include django
include supervisor
django::resource::project {'submitz':
ensure => present,
location => '/opt/submitz/submitz',
source => '[email protected]:xipax/submitz.git',
user => 'submitz',
@hameedullah
hameedullah / factorial.py
Created July 10, 2012 05:22 — forked from ghoseb/factorial.py
The evolution of a Python Programmer
#Newbie programmer
def factorial(x):
if x == 0:
return 1
else:
return x * factorial(x - 1)
print factorial(6)
#First year programmer, studied Pascal
@hameedullah
hameedullah / plugin-deploy.sh
Created November 16, 2012 08:17 — forked from markjaquith/plugin-deploy.sh
Plugin deploy script
#!/bin/bash
# args
MSG=${1-'deploy from git'}
BRANCH=${2-'trunk'}
# paths
SRC_DIR=$(git rev-parse --show-toplevel)
DIR_NAME=$(basename $SRC_DIR)
DEST_DIR=~/svn/wp-plugins/$DIR_NAME/$BRANCH
@hameedullah
hameedullah / gist:1678cf57df75092236649aefbce4f908
Created April 26, 2016 10:43 — forked from panuta/gist:3075882
How to setup Django server with virtualenv on Ubuntu Server 12.04

Fix locale problem

Run the following command

$ update-locale LC_ALL="en_US.UTF-8"

If it failed, you will need to add the following to /var/lib/locales/supported.d/local file

en_US.UTF-8 UTF-8