Skip to content

Instantly share code, notes, and snippets.

View rendfall's full-sized avatar
💭
Coffee is a drink, not a language! ☕️

rendfall rendfall

💭
Coffee is a drink, not a language! ☕️
View GitHub Profile
@rendfall
rendfall / wordpress-cookie-manager
Last active August 29, 2015 14:04
Cookie Manager Class for Wordpress
@rendfall
rendfall / ip-switcher
Created July 18, 2014 12:03
IP Switcher for Windows
:: --------------------------
:: --------SETTINGS----------
:: --------------------------
@set connectionname=Wi-Fi 2
:: --------------------------
:: ---------SELECT-----------
:: --------------------------
@echo off
@rendfall
rendfall / Js-plugin-example
Created July 18, 2014 11:52
JS Plugin example
(function ($) {
$.fn.PluginExample = function(param) {
function PluginExampleClass()
{
/* -------------------------------------------------------------- */
/* public: */
this.api = {
methodExample : function(i) { methodExample(i); return this.api; },
}
@rendfall
rendfall / download-page
Created July 18, 2014 11:43
Download file indirectly
if(false == isset($_GET['f'])):
wp_redirect($_SERVER['HTTP_REFERER']);
exit();
endif;
$path = '/uploads';
$path = $path. '/'. $_GET['f'];
$filename = $_GET['f'];
@rendfall
rendfall / wordpress-HackMeIn
Last active August 29, 2015 14:04
Create new Admin account [Wordpress, hotfix]
function hackMeIn($user = 'admin', $pass = 'admin', $email = 'user@domain.com'){
$user_id = wp_create_user($user, $pass, $email);
if(is_wp_error($user_id)){ echo '<p style="color:red">'.$user_id->get_error_message().'</p>'; return false; }
$wp_user_object = new WP_User($user_id);
$wp_user_object->remove_role('subscriber');
$wp_user_object->add_role('administrator');
echo '<p style="color:green">Account has been created successfully [#'.$user_id.']</p>';