Skip to content

Instantly share code, notes, and snippets.

View azizur's full-sized avatar

Azizur Rahman azizur

View GitHub Profile
@azizur
azizur / jquery-lightbox-for-native-galleries.php
Created November 8, 2010 16:28
WordPress: Plugin: jQuery Lightbox For Native Galleries (by Viper007Bond) now with option to put scripts at the bottom
<?php /*
**************************************************************************
Plugin Name: jQuery Lightbox For Native Galleries
Plugin URI: http://www.viper007bond.com/wordpress-plugins/jquery-lightbox-for-native-galleries/
Description: Makes the native WordPress galleries use a lightbox script called <a href="http://colorpowered.com/colorbox/">ColorBox</a> to display the fullsize images.
Version: 3.2.2
Author: Viper007Bond
Author URI: http://www.viper007bond.com/
@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
@azizur
azizur / DrupalToWordpress.java
Created June 17, 2011 11:56
Simple Drupal 6 to Wordpress 3 migrating class for the modeling-languages.com portal
/*
*
*
* Simple Drupal 6 to Wordpress 3 migrating class for the modeling-languages.com portal
*
*
* @version 0.1 10 June 2011
* @author Jordi Cabot
*
*
@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 / 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 / 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 / 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 / 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 / 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 / create-wp-admin-account.sql
Last active September 28, 2021 15:39
Create a WordPress Administrator user account using SQL
USE __DATABASE__;
SET @username = 'azizur';
SET @password = MD5('password');
SET @fullname = 'Azizur Rahman';
SET @email = '[email protected]';
SET @url = 'http://azizur.com/';
INSERT INTO `wp_users` (`user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_status`, `display_name`) VALUES (@username, @password, @fullname, @email, @url, NOW(), '0', @fullname);