Skip to content

Instantly share code, notes, and snippets.

Automating everything with

Ahmad Awais ⚡️ ahmadawais

Automating everything with
View GitHub Profile
View BirdMan
package crappyBird;
import java.awt.Graphics;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.image.BufferedImage;
View Gemfile
source ""
group :development do
gem 'rake'
gem 'guard'
gem 'coffee-script'
gem 'rb-fsevent'
gem 'rb-inotify'
gem 'compass', '0.11.5'
gem 'sass', '3.1.5'
gem 'guard-compass'
View commercial-client.php
* Plugin Name: Commercial Client
* Plugin URI:
* Description: A sample client plugin for showing updates for plugins
* Author: pento
* Version: 0.1
* Author URI:
* License: GPL2+
ahmadawais / script.js
Created Aug 22, 2014
Quickstand Filterable Portfolio script for latest jQuery shipped with WordPress
View script.js
Custom JS - All front-end jQuery
jQuery(document).ready(function() {
ahmadawais / aa_custom_page.php
Created Aug 24, 2014
Fetch Number of posts in Last 24 hours for WordPress
View aa_custom_page.php
<?php /* Template Name: Test AA */
get_header(); ?>
<!-- section -->
<section class="aa_sec1">
<?php echo aa_get_posts_count_from_last_24h(); ?>
<?php echo aa_get_posts_count_from_today(); ?>
View image-upload-field-custom-taxonomy
/* Add Image Upload to Series Taxonomy */
// Add Upload fields to "Add New Taxonomy" form
function add_series_image_field() {
// this will add the custom meta field to the add new term page
<div class="form-field">
<label for="series_image"><?php _e( 'Series Image:', 'journey' ); ?></label>
View Background-image-gradient-overlay.markdown
ahmadawais / gist:0ddde36a2bb8c83bd52b
Created Oct 6, 2014
Check if it is a particular WordPress page
View gist:0ddde36a2bb8c83bd52b
* @Check if it is a particular WordPress page
* @Codex
//This runs when page with ID 42 is being displayed
ahmadawais / meta.php
Created Oct 19, 2014
Echo and Decode HTML in a Meta value of WordPress
View meta.php
* Normally
* $content=get_post_meta($post->ID, 'SMTH_METANAME_VALUE', true);
* echo $content
echo html_entity_decode($content);
View WordPress: Minimize Dashboard
// Custom Dashboard widgets
function custom_dashboard_widgets() {
global $wp_meta_boxes;
unset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press'] );
unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links'] );
unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins'] );
unset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_primary'] );
unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now'] );
unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments'] );