Skip to content

Instantly share code, notes, and snippets.

View jimi008's full-sized avatar
🏠
Working from home

Jamil Ahmed jimi008

🏠
Working from home
View GitHub Profile
@oodavid
oodavid / README.md
Last active June 12, 2024 00:28 — forked from aronwoost/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/
@BFTrick
BFTrick / .htaccess
Created September 12, 2012 13:39
Default WordPress .htaccess File
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
@DavidWells
DavidWells / add-wordpress-settings-page.php
Created January 28, 2013 05:59
WordPress :: Add Settings Page with All Fields
<?php
/*
Plugin Name: Homepage Settings for BigBang
Plugin URI: http://www.inboundnow.com/
Description: Adds additional functionality to the big bang theme.
Author: David Wells
Author URI: http://www.inboundnow.com
*/
// Specify Hooks/Filters
@jameskoster
jameskoster / functions.php
Last active December 14, 2015 23:59
WordPress - Move the textarea to the top of the comment form
function jk_move_textarea( $input = array () ) {
static $textarea = '';
if ( 'comment_form_defaults' === current_filter() ) {
$textarea = $input['comment_field'];
$input['comment_field'] = '';
return $input;
}
if ( is_singular( 'post' ) || is_page() ) {
print $textarea;
@jrfnl
jrfnl / wp-config-debug.php
Last active May 23, 2024 07:06
Code to add to wp-config.php to enhance information available for debugging.
<?php
/**
* == About this Gist ==
*
* Code to add to wp-config.php to enhance information available for debugging.
*
* You would typically add this code below the database, language and salt settings
*
* Oh.. and *do* make sure you change the path to the log file to a proper file path on your server (make sure it exists).
*
@wpexplorer
wpexplorer / gist:6574282
Created September 15, 2013 20:58
Simple WordPress login/logout shortcode
if ( ! function_exists('wpex_loginout_shortcode') ) {
function wpex_loginout_shortcode( $atts ) {
extract( shortcode_atts( array(
'login_url' => wp_login_url(),
'log_in_text' => __( 'log in', 'wpex' ),
'log_out_text' => __( 'log out', 'wpex' ),
), $atts ) );
if ( is_user_logged_in() ) {
$url = wp_logout_url( home_url() );
return '<a href="'. $url .'" title="'. $log_out_text .'">'. $log_out_text .'</a>';
@paulund
paulund / example-wp-list-table.php
Last active May 20, 2024 05:29
An example code of using the WP_List_Table class. With Pagination.
<?php
/*
* Plugin Name: Paulund WP List Table Example
* Description: An example of how to use the WP_List_Table class to display data in your WordPress Admin area
* Plugin URI: http://www.paulund.co.uk
* Author: Paul Underwood
* Author URI: http://www.paulund.co.uk
* Version: 1.0
* License: GPL2
*/
@rcotrina94
rcotrina94 / How to use Images as Radio buttons.md
Last active February 22, 2024 13:29
How to use images for radio buttons (input-radio).
@gene1wood
gene1wood / batch-delete-gmail-emails.js
Last active June 24, 2024 04:00
A Google Apps Script script to bulk delete large amounts of email in Gmail while avoiding the error #793 which Gmail encounters normally
/*
This script, when used with Google Apps Scripts, will delete 400 emails and
can be triggered to run every few minutes without user interaction enabling you
to bulk delete email in Gmail without getting the #793 error from Gmail.
Google returns a maximum of 500 email threads in a single API call.
This script fetches 400 threads in case 500 threads is causing timeouts
Configure the search query in the code below to match the type of emails
you want to delete
@trslater
trslater / custom-registration.php
Last active May 12, 2020 13:47
Custom Registration Plugin
<?php
/*
Plugin Name: Custom Registration
Description: Updates user rating based on number of posts.
Version: 1.1
Author: Tristan Slater w/ Agbonghama Collins
Author URI: http://kanso.ca
*/