This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//----------------------------------------------------------/ | |
// responsive images [ 1) add img-responsive class 2) remove dimensions ] | |
//----------------------------------------------------------/ | |
function bootstrap_responsive_images( $html ){ | |
$classes = 'img-responsive'; // separated by spaces, e.g. 'img image-link' | |
// check if there are already classes assigned to the anchor | |
if ( preg_match('/<img.*? class="/', $html) ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Script by https://wpindexfixer.tools.managedwphosting.nl | |
These are the queries for WP version 5.3.2 | |
You need to replace wp_ with your site prefix — could be wp_ or something | |
-- Starting with wp_users | |
DELETE FROM wp_users WHERE ID = 0; | |
ALTER TABLE wp_users ADD PRIMARY KEY (ID); | |
ALTER TABLE wp_users ADD KEY user_login_key (user_login); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- "Rocket Man" by Chris Gannon https://cdpn.io/EjVyXN --> | |
<svg id="motionPath" viewBox="-20 0 557 190"> | |
<path id="path" d="M514.848,240.268 C514.848,240.268 462.662,309.218 412.151,283.486 360.531,257.176 424.152,258.407 369.053,201.105 311.913,141.681 165.959,196.156 231.489,257.236 266.054,289.453 337.87,332.206 321.33799,225.90001 315.616,189.108 133.021,268.325 123.252,316.289 110.777,377.48 227.33,329.843 281.915,305.464 335.673,281.454 173.976,283.356 86.665,300.815 6.436,316.844 20.851,252.546 20.851,252.546 "/> | |
<path id="path2" d="M6.931,91.47 C6.931,91.47 144.087,127.04 105.017,130.397 47.303,135.349 93.65999,62.66001 168.74799,36.56901 231.32099,14.82701 180.40899,65.70901 245.79799,65.03901 312.60199,64.35401 333.10199,116.64001 307.50799,134.80901 277.14599,156.36201 141.60999,64.21301 131.83799,112.16901 119.36699,173.36601 216.199,184.68 268.085,214.373 326.136,247.594 392.043,78.874 409.064,75.233 424.067,72.023 505.879,63.687 505.879,63.687 " /> | |
<image class="astronaut" xlink: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
"use strict"; | |
$(document).ready(function (){ | |
// push custom widgetized calendar widget (hidden inside footer page) | |
// to masonry layout grid | |
var elem = $('.calmasonry').clone() | |
// clone the classes for layout of the box | |
elem.addClass('isotope-entry col span_1_of_4').removeClass('hidden') | |
$('#blog-entries').masonry().append( elem ).masonry( 'appended', elem ).masonry() | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
# let it sleep for half a minute.. | |
sleep 30 | |
# get my current mobile IP address! | |
IP=$(dig +short myip.opendns.com @resolver1.opendns.com) | |
# move to root dir | |
cd /home/krex/bin/IPS_TELE2/ | |
# append current IP if not there already | |
grep -qxF $IP file || echo $IP >> file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var start = "some starting term"; | |
var end = "some ending term"; | |
var reg = new RegExp("(?:"+ start +")([\\s\\S]*)(?:"+ end +")", "igm"); | |
var j = res.match( reg ); | |
// example with search markers | |
var txt = `Lorem Ipsum is simply dummy | |
text of the printing and typesetting industry. | |
Lorem Ipsum has been the industry's standard | |
dummy text ever since the 1500s, when an unknown printer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- BEGIN website switcher --> | |
<select id="website-changer" onChange="document.location=this.options[selectedIndex].value"> | |
<?php | |
$websites = Mage::getModel('core/website')->getCollection(); | |
foreach($websites as $website) | |
{ | |
$default_store = $website->getDefaultStore(); | |
$url_obj = new Mage_Core_Model_Url(); | |
$default_store_path = $url_obj->getBaseUrl(array('_store'=> $default_store->getCode())); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*zebra for select2*/ | |
ul.select2-results li:nth-child(even){ | |
background-color: #ddd; | |
color: black; | |
} | |
ul.select2-results li:nth-child(even):hover{ | |
background-color: #333; | |
color: white; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Rewrite Wordpress upload path | |
Plugin URI: http://mkdizajn.com | |
Description: Rewrites your image paths. | |
Version: 2.4 | |
Author: kreso | |
Author URI: http://mkdizajn.com/ | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://www.google.hr/search?tbs=sbi:AMhZZiuvJh9qdvPGSzBLKa9IO6t9V7S7dIN-vFwmyFDKIfON_1ACNEchxJA-56WbyXVhQpZZ3IIdWLu7jvKoC1N-Tzx0sFE5xyqSa-05GZ-k1Q6IgeDEikSURitBjoaKh8SAVf-JgsNj_1bpC14Ecrl6hnbiS-ajo5ZsL2YQG2Plm7VdBq7pzh9I0S1rYYqcHmv7fesqR290J5AZreHD67sCqPWi8XucQWHYlkl9GWvQvni9zILnWQ7tSynK8F08GCMvDgIlpld-RCk6IddixocavYEuPy0YF1gaiZMaGQYA6_1pzAYlpG2DTUY0BXLpIz9u9zb5QhVkYzNrokvoORmiFAWkmybTM-TGQ&hl=en-HR | |