Skip to content

Instantly share code, notes, and snippets.

Svetoslav Marinov lordspace

Block or report user

Report or block lordspace

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
bappi-d-great / code.php
Created Aug 11, 2015
Remove role and assign subscriber role to the user or membership cancel
View code.php
add_action( 'ms_model_event', 'my_event_handler', 10, 2 );
* Handles an event and process the correct communication if required.
* @param MS_Model_Event $event The event that is processed.
* @param mixed $data The data passed to the event handler.
renarsvilnis /
Last active May 26, 2017
Guide for configuring server for apache, php, ssh etc..


A reference for setting up Linux/Ubuntu server for LAMP, Node.js laboratory.

May be helpful for others, hence this git. If it contains errors, please push them.

This assumes

codeablehq /
Last active Jul 3, 2017
A script that creates a backup of your WordPress site and uploads it to Dropbox
# For this script to work, save it somewhere in the executable path, like /usr/local/sbin/
# make it executable: chmod +x /usr/local/sbin/
# then add it to cron: crontab -e
# and add the line below, which will run backup 3am each day, then upload to Dropbox
# 0 3 * * * /usr/local/sbin/ > /dev/null 2>&1
# You also need WP CLI installed:
Xeoncross / record.php
Last active Dec 15, 2015
Record audio from flash to MP3 using PHP
View record.php
# Save the audio to a URL-accessible directory for playback.
parse_str($_SERVER['QUERY_STRING'], $params);
$name = isset($params['name']) ? $params['name'] : 'output.wav';
$content = file_get_contents('php://input');
$fh = fopen($name, 'w') or die("can't open file");
fwrite($fh, $content);
jchristopher / class-iti-cap-limiter.php
Created Mar 7, 2012
[WordPress] Prevents the creation of full Administrators by client accounts
View class-iti-cap-limiter.php
* Prevents the creation of full Administrators by client accounts
* Forked from JPB_User_Caps (unable to locate origin)
* @return void
* @author Jonathan Christopher
if( is_admin() )
johnpbloch / disable-plugins-when-doing-local-dev.php
Created Feb 11, 2012 — forked from markjaquith/disable-plugins-when-doing-local-dev.php
Disables specified WordPress plugins when doing local development
View disable-plugins-when-doing-local-dev.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:
hakre / dl-file.php
Created Jan 2, 2012
Wordpress login to download uploaded files
View dl-file.php
* dl-file.php
* Protect uploaded files with login.
* @link
* @author hakre <>
* @license GPL-3.0+
mastergizmo / jq-mobile-green-button-theme.css
Created Aug 5, 2011 — forked from irohiroki/gist:909284
jQuery Mobile Green Theme for Buttons
View jq-mobile-green-button-theme.css
.ui-btn-up-g, .ui-btn-hover-g, .ui-btn-down-g
color: white;
font-weight: bold;
text-decoration: none;
border: 1px solid #397114;
You can’t perform that action at this time.