Skip to content

Instantly share code, notes, and snippets.

View azizur's full-sized avatar

Azizur Rahman azizur

View GitHub Profile
#!/bin/sh
#
# Adam Sharp
# Aug 21, 2013
#
# Usage: Add it to your PATH and `git remove-submodule path/to/submodule`.
#
# Change to a directory that’s in your PATH, I used /usr/local/bin and run the following commands:
#
# $ curl -o git-remove-submodule https://gist.githubusercontent.com/azizur/10c814ae16a9d75d4e42/raw/fa7b5e9c30a0118d51625dd038e363aceefd382c/git-remove-submodule
@azizur
azizur / aeromaxx-parse-request.php
Created August 23, 2012 22:52 — forked from mikeschinkel/aeromaxx-parse-request.php
WordPress URLs for 1 taxonomy on 2 different custom post types
<?php
/**
* Answering: http://lists.automattic.com/pipermail/wp-hackers/2012-August/044119.html
* By: Mike Schinkel - http://about.me/mikeschinkel
*/
add_action( 'parse_request', 'aeromaxx_parse_request' );
function aeromaxx_parse_request( $wp ) {
if ( preg_match( '#^/(draw-results|ball-statistics)/game/([^/]+)/#', $_SERVER['REQUEST_URI'], $matches ) ) {
$wp->query_vars = array(
'post_type' => $matches[1], // Assumes your post types are registered with same name as your URL slugs
@azizur
azizur / README.md
Created August 6, 2012 00:09 — forked from aronwoost/README.md
Build auto-deploy with php and git(hub) on an EC2 Amazon AMI instance

Kind of continue from the other gist how to install LAMP on an Amazon AMI

##Install git

sudo yum install git-core

##Create ssh directory since it doesn't exists by default on the Amazon AMI

@azizur
azizur / README.md
Created August 6, 2012 00:08 — forked from oodavid/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@azizur
azizur / custom-post-type-archive-menu-links.php
Created July 16, 2012 01:00 — forked from helgatheviking/custom-post-type-archive-menu-links.php
Adds Custom Post Type archives to the WordPress-powered menus
<?php
/*
Plugin Name: Custom Post Type Archive Menu Links
Plugin URI: http://codeseekah.com/2012/03/01/custom-post-type-archives-in-wordpress-menus-2/
Description: Easily Add Custom Post Type Archives to the Nav Menus
Version: 1.0
Author: soulseekah
Author URI: http://codeseekah.com
License: GPL2
@azizur
azizur / install_owncloud_f16.sh
Created June 10, 2012 15:33 — forked from amitsaha/install_owncloud_f16.sh
Install ownCloud3 on Fedora 16
#!/bin/bash
# Shell script to setup and install ownCloud3 on Fedora 16 (and later, hopefully)
# You may try on others, but it may not work
# Run it as root/sudo
# Also installs PageKite (http://pagekite.net)
# Any harm to any object animate/inanimate caused by this script
@azizur
azizur / gist:1322503
Created October 28, 2011 15:13 — forked from mattwynne/gist:825967
invoice.feature
Scenario: Create an invoice
Given I am an authenticated user with an admin role
And a client "test client" exists with name: "test client", initials: "TTC"
And a project "test project" exists with name: "test project", client: client "test client"
And a ticket "test ticket" exists with project: project "test project", name: "test ticket"
And a work_unit "test work unit" exists with ticket: ticket "test ticket", scheduled_at: "2010-01-01"
And I am on the admin invoices page
Then I should see "test client"
And I follow "test client"
And I fill in "global_invoiced" with "123"
@azizur
azizur / twitter_timeline.coffee
Created June 1, 2011 13:57 — forked from kneath/twitter_timeline.coffee
Example file for my History API experiment
# JSONP callback for tweets fetched later than current (max_id)
window.twitterTimelineLaterCallback = (data) ->
window.app.twitterTimeline.receivedData(data, false)
# JSONP callback for tweets fetched earlier than current (since_id)
window.twitterTimelineEarlierCallback = (data) ->
window.app.twitterTimeline.receivedData(data, true)
class window.TwitterTimeline
# Distance from the bottom that we ask for more tweets, distance from the