Skip to content

Instantly share code, notes, and snippets.

Merianos Nikos merianos

Block or report user

Report or block merianos

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
@merianos
merianos / OtTaxonomiesMetabox.php
Last active Jul 7, 2018
WordPress Taxonomies / Users MetaBox using OptionTree
View OtTaxonomiesMetabox.php
<?php
/**
* Created by PhpStorm.
* User: merianos
* Date: 6/7/2018
* Time: 8:39 μμ
*/
class OtTaxonomiesMetabox {
View style.css
/* CSS Code for the DL List in the sidebar of the page: /stoixima-odigos-theoria */
/* 07/May/2018 */
.icon-listed-dl {
display: table;
width: calc( 100% - 10px );
background: #FFF;
padding: 5px;
}
@merianos
merianos / functions.php
Created Oct 4, 2017
Custom font family in the Fonts control of the Elementor page builder after the version 1.7.10
View functions.php
// After the Elementor update to 1.7.10, the fonts list has change in the
// control settings from `fonts` to `options`.
//
// Thus for version after 1.7.10 we should use the following code for retrive
// and set the new font families.
$fonts = $controls_registry->get_control( 'font' )->get_settings( 'options' );
// Register here the custom font families
@merianos
merianos / functions.php
Last active May 22, 2019
Elementor custom fonts in font control
View functions.php
/**
* Responsible to modify the fonts list in the font control.
*/
function modify_controls( $controls_registry ) {
// First we get the fonts setting of the font control
$fonts = $controls_registry->get_control( 'font' )->get_settings( 'fonts' );
// Then we append the custom font family in the list of the fonts we retrieved in the previous step
$new_fonts = array_merge( [ 'Custom Font Family Name' => 'system' ], $fonts );
// Then we set a new list of fonts as the fonts setting of the font control
$controls_registry->get_control( 'font' )->set_settings( 'fonts', $new_fonts );
View Debug Log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'uninstall',
1 verbose cli '-g',
1 verbose cli 'webpack' ]
2 info using npm@5.0.3
3 info using node@v8.0.0
4 verbose npm-session bcc51cdedb9ff1c1
5 silly install loadCurrentTree
@merianos
merianos / click.js
Last active Oct 20, 2017
Automatically click the elements in pages
View click.js
var $checkBoxes = document.querySelectorAll('._1sy');
$checkBoxes.forEach(
function ( item ) {
var $parent = item.parentElement;
var $grandParent = $parent.parentElement;
var $grandGrandParent = $grandParent.parentElement;
var $grandGrandGrandParent = $grandGrandParent.parentElement;
var $grandGrandGrandGrandParent = $grandGrandGrandParent.parentElement;
$grandGrandGrandGrandParent.remove();
@merianos
merianos / index.html
Created Jan 27, 2017
Build button with transparent background color with gradient border and rounded corners
View index.html
<a href="#">
<span></span>
Do Something
</a>
View premier-league.json
1081: {
"id": 1081
"name": "Argentina: Primera Division"
"category": "Primera Division"
"country": "Argentina"
"date": 1477414809
"matches": [19]
0: {
"id": 2235305
"status": "FT"
@merianos
merianos / .htaccess
Created Aug 5, 2016
Browser caching
View .htaccess
# BEGIN W3TC Browser Cache
<IfModule mod_mime.c>
AddType text/css .css
AddType text/x-component .htc
AddType application/x-javascript .js
AddType application/javascript .js2
AddType text/javascript .js3
AddType text/x-js .js4
AddType text/html .html .htm
You can’t perform that action at this time.