March 2021
Libs
- Svelte in Markdown - embed Svelte directly to Markdown
Tools
- Removal.AI - AI-powered background removal
- Starship - The minimal, blazing-fast, and infinitely customizable prompt for any shell!
- bundless - Next gen dev server and bundler
- microsite - is a fast, opinionated static-site generator built on top of Snowpack.
January 2021
Tools & services
- Random user api - With the Bionic Reading© API you can deliver the next level of reading to your audience.
- Zero SSL - SSL Protection For Anyone Fast. Reliable. Free.
- Git Large File Storage (LFS) - Git extension for versioning large files
- Snowpack - The faster frontend build tool.
Image hosting
Gears
- Keychron K3 - World's First Hot-Swappable Low Profile Optical Wireless Mechanical Keyboard
- A2+ Speakers - A2+ premium powered speakers with high-fidelity stereo sound
- Gibbon AIR - active monitor system with Bluetooth
- Neumann NDH-20 - premium quality studio headphones
- Lagoon anc traveller - Wireless headphones with ANC from BeyerDynamic
- Sony WH-1000XM4 - Wireless Noise-Canceling Headphones form Sony
- Raspberry Pi Pico - Raspberry Pi Pico is a tiny, fast, and versatile board built using RP2040, a brand new microcontroller chip designed by Raspberry Pi
Comments
- Guestbook - GitHub issue based Guestbook
- Utteranc - A lightweight comments widget built on GitHub issues.
- Octomments - Using GitHub issues as a comment plugin.
- Commento - Embed comments without giving up your privacy.
- Fast Comments - A comment service that will delight your users and developers.
Earl Grey
Webdesign
- Primer - Design, build, and create with GitHub’s design system
PHP code speed comparison
function versus(callable $first, callable $second, $repeat = 100000) {
$f = microtime(true);
foreach (range(0, $repeat) as $r) call_user_func($first);
$firstTimer = microtime(true) - $f;
$s = microtime(true);
foreach (range(0, $repeat) as $r) call_user_func($second);
$secondTimer = microtime(true) - $s;
printf(
'%s function is %.2f%% faster (%f vs %f)',
$firstTimer < $secondTimer ? 'First' : 'Second',
abs((($firstTimer - $secondTimer) / $firstTimer) * 100),
$firstTimer, $secondTimer
);
}
Example
versus(
function () {
$str = '!loremipsum';
return substr($str, 0, 1) === '!';
},
function () {
$str = '!loremipsum';
return $str[0] === '!';
}
);
Will print:
Second function is 36.72% faster (0.142766 vs 0.090349)
Optimal Social Media Sizes
- Facebook profile picture size: 180×180
- Facebook cover photo size: 820×462
- Facebook link image size: 1200×630
- Facebook image post size: 1200×630
- Facebook event image size: 1920×1080
- Facebook group cover image size: 1640×922
Facebook Ads
- Facebook ad size: 1200×628
- Facebook Story ad size: 1080×1920
- Facebook messenger image ad size: 1200×628
Facebook Video
- Facebook video ad size: 1280×720
- Facebook video size: 1280×720
- Maximum Facebook video length: 240 minutes
- Instagram profile picture size: 110×110
- Instagram photo sizes: 1080×1080 (square), 1080×566 (landscape), 1080×1350 (portrait)
- Instagram photo thumbnails: 161×161
- Instagram Stories size: 1080×1920
Instagram Ads
- Instagram ads size: 1080×566 pixels (landscape), 1080×1080 pixels (square)
- Minimum Instagram image ad size: 500 pixels wide
Instagram video
- Minimum Instagram video sizes: 600×600 (square), 600×315 (landscape), 600×750 (portrait), 600×700 (Carousel video dimensions)
- Maximum Instagram video length: 60 seconds
- Instagram IGTV video size: 1080×1920
- Twitter profile picture size: 400×400 up to 2 MB
- Twitter header size: 1500×500
- Twitter post image size: 1024×512
- Twitter card image size: 1200×628
- Twitter ad size (image): 800×428
- Tweet sharing two images: 700×800 (both images)
- Tweet sharing three images:
- Left image: 700×800 pixels
- Right images: 1200×686 pixels
- Tweet sharing four images: 1200×600 pixels (per image)
- Maximum file size of 5 MB for photos, and 5 MB for animated GIFs on mobile and 15 MB on web.
Twitter video
- Twitter video size: 720×720 (square), 1280×720 (landscape), 720×1280 (portrait)
- Twitter ad size (video): 720×720 (square), 1280×720 (landscape), 720×1280 (portrait)
- Maximum Twitter video length: 140 seconds
Company pages:
- LinkedIn company logo size: 300×300
- LinkedIn cover photo size: 1536×768
- LinkedIn Dynamic Ads size: 100×100 (company logo)
- LinkedIn Sponsored Content image size: 1200×627
- LinkedIn Hero image size: 1128×376
- LinkedIn Business Banner image: 646×220
Personal pages:
- LinkedIn profile picture size: 400×400
- LinkedIn background photo size: 1584×396
- LinkedIn post image size: 1200×1200 (desktop) 1200×628 (mobile)
- LinkedIn link post size: 1200×628
- LinkedIn video size: 256×144 (minimum) to 4096×2304 (maximum)
- Maximum LinkedIn video length: 10 minutes
YouTube
- YouTube Channel cover picture: 2560×1440 pixels (desktop) and 1546×423 pixels (smartphones)
- YouTube Display ads: 300×250
- YouTube Overlay ads: 480×60
- YouTube Companion banner ads: 300×250 pixels
- YouTube Skippable video ads length: 6 – 20 seconds
- YouTube Non-skippable video ads length: 12 seconds to 3 minutes (30 seconds is recommended)
- YouTube Bumper video ads length: 6 seconds
- YouTube Standard video: 1280×760 pixels
TikTok
- Tik Tok Video length: 1080×1920, maximum 15 seconds recommended.
- Tik Tok Profile photo 200×200
- Profile Picture: 180×180 pixels (Displays 170×170 on Desktop)
- Cover Photo: 820×312 pixels
Debug WordPress 404 page
Insert following code to functions.php
for debuging 404 page:
ini_set('error_reporting', -1);
ini_set('display_errors', 'On');
add_action(
'parse_request',
function (&$wp) {
global $wp_rewrite;
printf('<h2>rewrite rules</h2><pre>%s</pre>', var_export($wp_rewrite->wp_rewrite_rules(), true));
printf('<h2>permalink structure</h2><pre>%s</pre>', var_export($wp_rewrite->permalink_structure, true));
printf('<h2>page permastruct</h2><pre>%s</pre>', var_export($wp_rewrite->get_page_permastruct(), true));
printf('<h2>matched rule and query</h2><pre>%s</pre>', var_export($wp->matched_rule, true));
printf('<h2>matched query</h2><pre>%s</pre>', var_export($wp->matched_query, true));
printf('<h2>request</h2><pre>%s</pre>', var_export($wp->request, true));
global $wp_the_query;
printf('<h2>the query</h2><pre>%s</pre>', var_export($wp_the_query, true));
}
);
add_action(
'template_redirect',
function () {
global $wp_filter;
printf(
'<h2>template redirect filters</h2><pre>%s</pre>',
var_export($wp_filter[current_filter()], true)
);
}, 99999
);
add_filter(
'template_include',
function ($template) {
printf(
'<h2>template file selected</h2><pre>%s</pre>',
var_export($template, true)
);
exit();
}
);
December 2020
Libs
- swiperjs - Swiper is the most modern free mobile touch slider
- Terminal.sexy - terminal color editor