IT Cooking

IT Stuff and Silly Shell


 

Header Anchors with AnchorJS for WordPress is nothing but so easy to set up… No shitty plugin is necessary: just some code snippets here and there, a JavaScript library, and voila the magic is happening 😀

It creates ID for your headers, and attach a hover anchor to them. ABSOLUTE development laziness, I love that.

Bonus: just adding the AnchorJS library + the JS snippet to your site will just work as fine!

(Read more…)

Posted In: WordPress, CSS, JavaScript, PHP Tags: ,

 

When it comes to PHP debugging… You like to know what’s going on don’t you! So you are tired or using  var_dump($myVar) because the printout is messed up with your HTML? Here is the Grail: a beautiful Debug PHP Function.

This one will display the complete set of calls (backtrace) as well as the variable/class/array to print out, in a flashy Yellow/Purple/Red/Cyan color set different for each type of variable. The z-index or 999 and the set of styles associated will make sure that it’s always visible.

(Read more…)

Posted In: PHP Tags: ,

 

Another commotion is spreading across the Internet about a potential threat: Meltdown and Spectre critical vulnerabilities found in Intel and other ARM CPUs will be exploited and hackers will steal your money, erase your data and mow your cat, blah blah blah.

If hackers knew or could have exploited it, you would have noticed. Catching fire now is too late. “Spectre” vulnerability is 15 years old. Now, please remember the Year 2000 bug hoax and follow the money 🤑

I’d like to be the bearer of good news, because you are all wrong about this threat. NO NEED TO PANIC and here is why:

(Read more…)

Posted In: Security Tags: , , ,

 

The default “read more…” link in WordPress is quite boring… and often, so-called theme developers just neglect it and leave it as is. Stuck on the left, no margin, no effects, barely noticeable, plain boring.

What about an awesome Fade Out effect instead? You can always find codepens and jsfiddles here and there but they have to be adapted for WordPress and you don’t have time to spend on this task. Search no more!

(Read more…)

Posted In: WordPress Tags:

Unleash your router with DDwrt and transform it into a Free Ad-Blocking DNS Home Router!

You may already know about Ad-Blocking plugins such as ABP or uBlock Origin for Chrome and Firefox, and these work fine… for your computer browser. But these plugins cannot be installed on a media TV, nor on TV Set Top box, nor on a multimedia phone.

Unless I missed something, iPhone browsers are all the same as they rely on Apple’s web framework. I’ve tested different ones some time ago on my 5gs and their web rendering results are all the same (Safari, Dolphin, Firefox). Therefore, they cannot accept plugins, not even mentioning Ad-Blocking plugins. Boooo. Even so jailbreaking allows you to install a local dns blocker, this will break ads detection in many apps, rendering them useless.

Solution? Install the Ad-Blocking software on your router:

(Read more…)

Posted In: Communication Tags: , ,

 

The Bootstrap Callout styles in their documentation is really a nice way to draw attention to important information. For some reason these Callouts are not included in the actual Bootstrap distribution.

Here is my interpretation of the missing CSS code for generic Bootstrap Callouts. The color codes for the info, warning, and danger Callouts are a direct pull from their live CSS for the docs, so I added styles for default, success, and primary.

They include a nice background, color derived from Bootstrap color rules. They also include a transparent and a disabled class.

(Read more…)

Posted In: CSS Tags: ,

 

 

WP CDNjs Reborn is back 😀 to help you speed up your WordPress site by delivering your Libraries from CDNjs.

 

WordPress plugin Git hub  Latest Git
WP-page Git  v0.2.4.zip

(Read more…)

Posted In: WordPress Tags: ,

 

Meme Generator online are legion, and they do not offer the same options. Most will limit the size or shape of your meme, and most will apply their signature stamp on it. Plus it takes time to upload the image, refresh the page etc.

There is a solution for you though, and pretty easy believe me! It’s based on ImageMagick, with a simple drag&drop batch script for Windows. This solution will let you create classy memes even your mother would be proud of!

(Read more…)

Posted In: scripting, Image Processing Tags: , ,

Let me say it again and again until everyone reminds it: NO, You Cannot Add Classes to WordPress Post Thumbnail / Featured Image.

A common idea circulating the web states that you can, and everyone goes with their own snippet of PHP code to add in your Theme index.php. They are all the same, and they are all wrong:

if ( has_post_thumbnail() ) {      // check if the post has a Post Thumbnail assigned to it.
  the_post_thumbnail( 'full', array( 'class'  => 'class2Add' ) );  // Add a class to the featured image/main post thumbnail
}

Why is this wrong? Because the array of class(es) that you pass to the function the_post_thumbnail() replaces the size classes WordPress has generated for this thumbnail.

(Read more…)

Posted In: WordPress Tags: ,

 

 

Adding the ability to Copy Text Code Blocks Without Flash, with a click from a Copy Text Button inside a Syntax highlighted Code Block, that’s real magic. Bonus: the copied code includes Rich Text Format (RTF syntax). This solution relies on Clibboard.JS, and is the easiest one to add to your site. I could make it work under two hours, so I hope this tutorial will help you make it in less!

This text will be copied onto the clipboard when you click the button below. Try it!

(Read more…)

Posted In: jQuery, WordPress, CSS Tags: , , ,
Next Page »