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
@lordspace
lordspace / openssl.cnf
Created May 7, 2019
This file is from Apache installation and it's referenced by this tutorial : How to Generate Certificate Authority (CA) Key and SSL Certificate with OpenSSL at https://orbisius.com/4583
View openssl.cnf
#
# OpenSSL example configuration file.
# This is mostly being used for generation of certificate requests.
#
# This definition stops the following lines choking if HOME isn't
# defined.
HOME = .
RANDFILE = $ENV::HOME/.rnd
@lordspace
lordspace / csv.php
Last active Mar 14, 2019 — forked from jaywilliams/csv_to_array.php
a class to read and write CSV
View csv.php
<?php
/**
* This class is used in Orbisius Price Changer for WooCommerce
* This premium WooCommerce extension allows you to change product prices (up/down) for all products or for a selected category and its subcategories.
* You can review them before actually making the changes.
*
* @see http://club.orbisius.com/products/wordpress-plugins/woocommerce-extensions/orbisius-woocommerce-ext-price-changer/
* @author jaywilliams | myd3.com | https://gist.github.com/jaywilliams
* @author Svetoslav Marinov (SLAVI) | http://orbisius.com
@lordspace
lordspace / wc-css-make-storefront-product-tabs-horizontal
Created May 23, 2018 — forked from vanbo/wc-css-make-storefront-product-tabs-horizontal
WooCommerce: CSS to make Storefront product tabs horizontal again
View wc-css-make-storefront-product-tabs-horizontal
/*
vanbo/wc-css-make-storefront-product-tabs-horizontal
credit: https://gist.github.com/vanbo/c05e9b9512bd53e3680c82e1c6e4e6a3
*/
.product .woocommerce-tabs ul.tabs {
width: 100%;
float: none;
margin-right: 5.8823529412%;
}
@lordspace
lordspace / orbisius_quick_fix_wc_ext_opt_co_fields.php
Created Aug 7, 2017
This code allows you to make some WooCommerce Checkout Fields optional.
View orbisius_quick_fix_wc_ext_opt_co_fields.php
<?php
/*
This code allows you to make some WooCommerce Checkout Fields optional.
Blog post http://orbisius.com/link/3710
Author: Svetoslav Marinov (Slavi)
Author URI: http://orbisius.com
*/
/*
Installation
@lordspace
lordspace / array2attribs
Created Jul 21, 2014
Here is a PHP class that allows you to create HTML attributes from a php array. If you pass the second parameter the key will be prefixed with 'data-' prefix so they can be access via jQuery later.
View array2attribs
Class HTML_Util {
/**
* Usage: HTML_Util::array2attribs();
* @param array $attributes
* @param bool $make_them_data will prefix each key with 'data-' prefix so it's acessible via $('#elem').data();
* @return string
* @see http://stackoverflow.com/questions/18081625/how-do-i-map-an-associative-array-to-html-element-attributes
*/
public static function array2attribs($attributes = array(), $make_them_data = 0) {
$pairs = array();
@lordspace
lordspace / Fake Sendmail Configuration Mandrill
Created Aug 26, 2014
Fake Sendmail Configuration for Using it with Mandrill. Uses non-ssl version as the SSL one worked OK on CLI but hanged when accessed via Apache
View Fake Sendmail Configuration Mandrill
; configuration for fake sendmail
; if this file doesn't exist, sendmail.exe will look for the settings in
; the registry, under HKLM\Software\Sendmail
[sendmail]
; you must change mail.mydomain.com to your smtp server,
; or to IIS's "pickup" directory. (generally C:\Inetpub\mailroot\Pickup)
; emails delivered via IIS's pickup directory cause sendmail to
@lordspace
lordspace / set_up_ssl_for_wp_news_site.txt
Last active Dec 19, 2016
These are instructions related to this article (How to Properly Set up an SSL Certificate for a News Site Based on WordPress) http://orbisius.com/wordpress/properly-set-ssl-certificate-news-site-based-wordpress/
View set_up_ssl_for_wp_news_site.txt
How To Setup Let's Encrypt SSL certificate for a news Site and Fix Mixed Content Error
///////////////////////////////////
// put this in wp-config.php
// orbisius.com
// GPL
ob_start( 'orbisius_custom_link_corrector_global' );
/**
* This is used here to correct all links that are not ssl
View my-spy.php
<?php
/**
* This file will send you alerts when your clients install/uninstall plugins
* Usage: Save this as wp-content/mu-plugins/my-spy.php
*
* License: GPL
* @author orbisius.com
* Use it at your own risk. You may have to disclose this in your terms of service.
* Check with a laywer first.
@lordspace
lordspace / send_mail_delayed.php
Created Jan 4, 2014
This function schedules an email by passing -odd parameters to sendmail. Those emails will be processed depending on: /etc/sysconfig/sendmail (using 1h) if sendmail is running all the time otherwise you may have to start sendmail via cron
View send_mail_delayed.php
<?php
/**
* This function schedules an email by passing -odd paramaters to sendmail.
* Those emails will be processed depending on: /etc/sysconfig/sendmail (using 1h)
* if sendmail is running all the time.
*
* @param string $email recipient
* @param string $subject - subject
* @param string $message - the message
@lordspace
lordspace / functions.php
Last active Dec 31, 2015
Use this snippet as a starting point when overriding functions from the parent theme (functions.php). The snippet might look like it's missing a closing php tag but this is done so there are no extra spaces added.
View functions.php
<?php
/*
Make sure that the function name matches the function name in the parent theme's functions.php file.
Also in the parent theme there must be a block e.g. !function_exists('function_name_that_you_want_to_override')
that will tell you that it is safe to override that function.
*/
function function_name_that_you_want_to_override() {
}
You can’t perform that action at this time.