Skip to content

Instantly share code, notes, and snippets.

View manchumahara's full-sized avatar
🎯
Focusing

Sabuj Kundu manchumahara

🎯
Focusing
View GitHub Profile
@manchumahara
manchumahara / gist:10569985
Last active August 29, 2015 13:59
for style use this ul.plainyearbasedtimelinelist{ border-left: 4px solid #E5E5E5 !important; margin-left: 20px; padding-left: 30px; }
<?php
$last_changed = wp_cache_get( 'last_changed', 'posts' );
if ( ! $last_changed ) {
$last_changed = microtime();
wp_cache_set( 'last_changed', $last_changed, 'posts' );
}
global $wpdb;
@janikvonrotz
janikvonrotz / Install WordPress Blog.md
Created March 3, 2014 08:21
Step by Step: Install WordPress Blog #PHP #MySQL #Nginx #phpMyAdmin #WordPress #Markdown #Ubuntu

Finishing this guide you'll get:

  • A running WordPress installation
  • Nginx proxy with PHP and Fast CGI
  • MySQL server accessible with phpMyAdmin

Specification of latest running installation:

  • Date: 03.03.2014
@brasofilo
brasofilo / comments-2-excel.php
Last active April 1, 2018 06:54
Export WordPress Comments as Excel file. Uses PHPExcel, http://phpexcel.codeplex.com/. Place this file in the root of the WordPress installation. TODO: convert to plugin.
<?php
# Load slim WP
define( 'WP_USE_THEMES', false );
require( './wp-load.php' );
# http://phpexcel.codeplex.com/
require_once dirname(__FILE__) . '/Classes/PHPExcel.php';
global $wpdb;
$query = "SELECT * FROM $wpdb->comments
@raelgc
raelgc / Email Server (Windows Only).md
Last active May 5, 2024 16:43
Setup a Local Only Email Server (Windows Only)
@atufkas
atufkas / migrate_mysq4to5.sh
Last active June 18, 2019 13:47
Converting MySQL4 database dump syntax to MySQL5
#
# MIGRATE MySQL4 DATABASES TO MySQL5 - Steps for dumping and converting
#
# Uses mysqldump and patches output to be compatible with MySQL 5.5+ (? - no sure
# at which specific release of MySQL 5 the old style syntax support ended).
#
# Conversion is most likely incomplete. It does some essential converting where
# I regularly experienced problems during migration.
#
# Use on own risk, always try with test databases first. No warranty at all!
@chrisjlee
chrisjlee / drupal-views-share-global-text-field
Last active April 23, 2024 04:07
share url's for facebook, twitter, pinterest with just get variables
<ul>
<li class="share-text">Share this>/li>
<li class="share-tw"><a href="http://twitter.com/share?text=[title]"><span></span></a></li>
<li class="share-fb"><a href="http://www.facebook.com/sharer.php?u=/node/[nid]&p=[title]"><span></span></a></li>
<li class="share-pinterest"><a href="http://pinterest.com/pin/create/button/?url=/node/[nid]&description=[title]"><span></span></a></li>
</ul>
@Adirael
Adirael / fix-wordpress-permissions.sh
Created August 17, 2012 23:16
Fix wordpress file permissions
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory
(function($,sr){
// debouncing function from John Hann
// http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/
var debounce = function (func, threshold, execAsap) {
var timeout;
return function debounced () {
var obj = this, args = arguments;
function delayed () {
@zachbrowne
zachbrowne / auto-post.php
Created August 9, 2012 06:45
Auto post status updates to Google+
<?php
// REQUIRED PARAMETERS
$status = 'http://www.mylink.com';
$email = 'your@email.com';
$pass = 'yourpassw0rd';
@jcemer
jcemer / gist:3130835
Created July 17, 2012 17:55
Less gradient mixins
#gradient {
.vertical(@startColor: #555, @endColor: #333, @colorStop: 100%) {
background-color: mix(@startColor, @endColor, 60%);
background-image: -moz-linear-gradient(top, @startColor, @endColor @colorStop); // FF 3.6+
background-image: -ms-linear-gradient(top, @startColor, @endColor @colorStop); // IE10
background-image: -webkit-gradient(linear, 0 0, 0 @colorStop, from(@startColor), to(@endColor)); // Android 2.3, Safari 4+, Chrome 2+
background-image: -webkit-linear-gradient(top, @startColor, @endColor @colorStop); // Safari 5.1+, Chrome 10+
background-image: -o-linear-gradient(top, @startColor, @endColor @colorStop); // Opera 11.10
background-image: linear-gradient(top, @startColor, @endColor @colorStop); // The standard
}