Skip to content

Instantly share code, notes, and snippets.

@KoljaL
KoljaL / 55-bytes-of-css.md
Created September 29, 2022 19:56 — forked from JoeyBurzynski/55-bytes-of-css.md
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@KoljaL
KoljaL / next_prev_post.php
Created October 21, 2021 02:17 — forked from rveitch/next_prev_post.php
Get next and prev posts in Wordpress by alphabetical order.
<?PHP
/*
* Sort Next/Previous Post Link Buttons Alphabetically
*/
function filter_next_post_sort($sort) {
if (get_post_type($post) == 'portfolio_page') {
$sort = "ORDER BY p.post_title ASC LIMIT 1";
}
else{
$sort = "ORDER BY p.post_date ASC LIMIT 1";
@KoljaL
KoljaL / php-comments-trick.php
Last active December 21, 2021 21:11 — forked from mircobabini/php-comments-trick.php
PHP comment trick
<?php
//* remove the first slash to toggle the enabled code
$time = microtime( true );
/*/
$time = microtime();
/**/
// thanks @lamemind