Skip to content

Instantly share code, notes, and snippets.

Avatar

Yulian Diaz spatialy

View GitHub Profile
View install-php7.2-mcrypt.sh
##
## 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 Dec 15, 2020 — forked from sadekbaroudi/config_si.php
SugarCRM 7 - Silent Installer
View config_si.php
<?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 Jan 3, 2019 — forked from ethanpil/wp-secure.conf
Wordpress Security for NginX
View wp-secure.conf
# 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 Oct 22, 2018 — forked from dasbairagya/disable.js
Script to disable the right click and inspect elemt of any browser :
View disable.js
$(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 Oct 22, 2018 — forked from dasbairagya/function.php
short code to get the woocommerce recently viewed products
View function.php
//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();
View gist:e81a19b126f3136f770cc63ec0f71c95
<!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>
View IAB-Categories.json
{
"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",