The popular open-source contract for web professionals by Stuff & Nonsense
- Originally published: 23rd December 2008
- Revised date: March 15th 2016
- Original post
| <?php | |
| // Source: https://www.wpbeginner.com/wp-tutorials/automatically-remove-default-image-links-wordpress/ | |
| // functions.php | |
| function wpb_imagelink_setup() { | |
| $image_set = get_option( 'image_default_link_type' ); | |
| if ($image_set !== 'none') { | |
| update_option('image_default_link_type', 'none'); | |
| } |
| // Source: https://stackoverflow.com/questions/2200494/jquery-trigger-event-when-an-element-is-removed-from-the-dom | |
| (function($){ | |
| $.event.special.destroyed = { | |
| remove: function(o) { | |
| if (o.handler) { | |
| o.handler() | |
| } | |
| } | |
| } |
| // Source: https://twitter.com/Una/status/951519740840873984 | |
| .full-width { | |
| width: 100vw; | |
| position: relative; | |
| left: 50%; | |
| right: 50%; | |
| margin-left: -50vw; | |
| margin-right: -50vw; | |
| } |
Well, that was unexpected. In the following, I’m trying to follow Jon Evans’ advice from “The Terrible Technical Interview”.
To: [email protected]
From: Ahmed Fasih
Subject: Re: Programming Test Invitation
Hi there! Thanks for offering to let me take a HackerRank test for ABC, I appreciate the vote of confidence.
| var content = 'MY TEXT WITH INVISIBLE CHARS'; | |
| if (content.search(/[^\u0000-\u007E]/g) >= -1) { | |
| content.replace(/[^\u0000-\u007E]/g, ""); | |
| this.code.set(content); | |
| } |
| # Source https://stackoverflow.com/a/39234763/1644311 | |
| git difftool -d --tool=bc3 BRANCH1 BRANCH2 |
| .atomicobject.com { | |
| padding-bottom: 15px; | |
| padding-bottom: 1.5rem; | |
| font-family: 'Merriweather', serif; | |
| font-size: 17px; | |
| line-height: 30px; | |
| font-weight: 100; | |
| } |
| <?php | |
| /** | |
| * Converts integer to Roman. | |
| * | |
| * @param int $integer | |
| * Integer to be converted to Roman string. | |
| * | |
| * @return string | |
| */ | |
| public function integerToRoman($integer) { |
| // Expose module as global variable | |
| var Module = function(){ | |
| // Inner logic | |
| function sayHello(){ | |
| console.log('Hello'); | |
| } | |
| // Expose API | |
| return { | |
| sayHello: sayHello |