Skip to content

Instantly share code, notes, and snippets.

View azizur's full-sized avatar

Azizur Rahman azizur

View GitHub Profile
@jwage
jwage / SplClassLoader.php
Last active April 1, 2026 10:11
Add MIT license.
<?php
/*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
@jscherer26
jscherer26 / Acl.php
Created December 17, 2009 18:00
Zend Navigation & Acl
<?php
class Model_Acl extends Zend_Acl {
public function __construct() {
// define Roles
$this->addRole(new Zend_Acl_Role('guest')); // not authenicated
$this->addRole(new Zend_Acl_Role('member'), 'guest'); // authenticated as member inherit guest privilages
$this->addRole(new Zend_Acl_Role('admin'), 'member'); // authenticated as admin inherit member privilages
<?php
/*
PHP command-line shell script to access the WordPress database and print out the list of active plugins.
SYNTAX:
php wp-active-plugins.php $host $db $user $pw
For example:
<?php
/*
Plugin Name: Employee List
Description: Leverages an existing "employee" custom post type to create a shortcode for a list of employees
Version: 0.1
Author: Mark Jaquith
Author URI: http://coveredwebservices.com/
*/
function tampa_employee_list() {
@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/
// =========================
// Example 1: using a @mixin
// =========================
// SCSS:
@mixin a_pink_box() {
float: left;
display: block;
color: pink;
@janfabry
janfabry / wpse17728.php
Created May 19, 2011 20:31
Dump WP image resize information
<?php
/*
Plugin Name: WPSE 17728
Plugin URI: http://wordpress.stackexchange.com/questions/17728/large-image-size-is-cropped-not-proportional
Description: Large image size is cropped, not proportional?
Author: jimilesku
*/
add_filter( 'intermediate_image_sizes_advanced', 'wpse17728_intermediate_image_sizes_advanced' );
function wpse17728_intermediate_image_sizes_advanced( $sizes )
@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
*
*
@markjaquith
markjaquith / disable-plugins-when-doing-local-dev.php
Created June 24, 2011 10:24
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/
*/
@aronwoost
aronwoost / README.md
Created July 25, 2011 19:48
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