Skip to content

Instantly share code, notes, and snippets.

View merianos's full-sized avatar

Merianos Nikos merianos

View GitHub Profile
@merianos
merianos / index.html
Created December 6, 2015 09:00
Example implementaions
<div class="text-center text-sm-left text-lg-right">
Tollere capacius cingebant librata eodem pugnabant!
</div>
@merianos
merianos / vhost.conf
Created February 26, 2016 11:37
Apache virtual host with Virtual Document Root
<VirtualHost 192.168.1.101:80>
UseCanonicalName Off
VirtualDocumentRoot "/media/merianos/Large Internal/Web Development Projects/%3/%2.1/%2+"
ServerAlias *
DirectoryIndex index.php index.html index.htm
LogLevel debug
ErrorLog /var/log/apache2/vhosts-error.log
CustomLog /var/log/apache2/vhosts-access.log combined
@merianos
merianos / .htaccess
Created August 5, 2016 09:18
Browser caching
# 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
1081: {
"id": 1081
"name": "Argentina: Primera Division"
"category": "Primera Division"
"country": "Argentina"
"date": 1477414809
"matches": [19]
0: {
"id": 2235305
"status": "FT"
@merianos
merianos / index.html
Created January 27, 2017 08:36
Build button with transparent background color with gradient border and rounded corners
<a href="#">
<span></span>
Do Something
</a>
@merianos
merianos / click.js
Last active October 20, 2017 11:22
Automatically click the elements in pages
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 / Debug Log
Created June 19, 2017 09:58
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 / functions.php
Last active August 20, 2023 15:49
Elementor custom fonts in font control
/**
* 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 );
@merianos
merianos / functions.php
Created October 4, 2017 06:19
Custom font family in the Fonts control of the Elementor page builder after the version 1.7.10
// 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