Skip to content

Instantly share code, notes, and snippets.

View spatialy's full-sized avatar

Yulian Diaz spatialy

View GitHub Profile
##
## How to install mcrypt in php7.2 / php7.3
## Linux / MacOS / OSX
##
## https://lukasmestan.com/install-mcrypt-extension-in-php7-2/
#
@spatialy
spatialy / config_si.php
Created December 15, 2020 03:46 — forked from sadekbaroudi/config_si.php
SugarCRM 7 - Silent Installer
<?php
$sugar_config_si = array (
'default_currency_iso4217' => 'USD',
'default_currency_name' => 'US Dollars',
'default_currency_significant_digits' => '2',
'default_currency_symbol' => '$',
'default_date_format' => 'Y-m-d',
'default_decimal_seperator' => '.',
'default_export_charset' => 'ISO-8859-1',
@spatialy
spatialy / wp-secure.conf
Created January 3, 2019 18:07 — forked from ethanpil/wp-secure.conf
Wordpress Security for NginX
# wp-secure.conf
#
#
# This file includes common security considerations for wordpress using nginx.
#
# The goal is to block actions which are usually dangerous to wordpress.
# Additionally, we block direct access to PHP files and folders which should not
# be accessed directly from a browser.
#
# Also have included exceptions for plugins that are known to require this access.
@spatialy
spatialy / disable.js
Created October 22, 2018 18:59 — forked from dasbairagya/disable.js
Script to disable the right click and inspect elemt of any browser :
$(document).keydown(function(e) {
return 123 == e.keyCode ? !1 : e.ctrlKey && e.shiftKey && 73 == e.keyCode ? !1 : void 0
}), document.addEventListener("contextmenu", function(e) {
e.preventDefault()
}), document.onkeydown = function(e) {
return !e.ctrlKey || 67 !== e.keyCode && 86 !== e.keyCode && 85 !== e.keyCode && 117 !== e.keyCode ? !0 : !1
}, $(document).keypress("u", function(e) {
return e.ctrlKey ? !1 : !0
});
@spatialy
spatialy / function.php
Created October 22, 2018 18:58 — forked from dasbairagya/function.php
short code to get the woocommerce recently viewed products
//short code to get the woocommerce recently viewed products
<?php function custom_track_product_view() {
if ( ! is_singular( 'product' ) ) {
return;
}
global $post;
if ( empty( $_COOKIE['woocommerce_recently_viewed'] ) )
$viewed_products = array();
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- Copyright the Rubicon Project 2010 -->
<html>
<head>
<title></title>
</head>
{
"IAB1": "Arts & Entertainment",
"IAB1-1": "Books & Literature",
"IAB1-2": "Celebrity Fan/Gossip",
"IAB1-3": "Fine Art",
"IAB1-4": "Humor",
"IAB1-5": "Movies",
"IAB1-6": "Music",
"IAB1-7": "Television",
"IAB2": "Automotive",