Skip to content

Instantly share code, notes, and snippets.

View SimonMayerhofer's full-sized avatar
🕶️
'sup?

Simon Mayerhofer SimonMayerhofer

🕶️
'sup?
View GitHub Profile
@simonw
simonw / remove-message.js
Last active May 15, 2025 20:37
JavaScript one-liner for removing a ?message=... parameter from the visible URL in the browser
history.replaceState && history.replaceState(
null, '', location.pathname + location.search.replace(/[\?&]message=[^&]+/, '').replace(/^&/, '?')
);
@paulirish
paulirish / what-forces-layout.md
Last active May 16, 2025 01:11
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
# This file follows the WordPress CSS standards as closely as possible. For any
# linters that aren't listed in this file, we're accepting the default settings.
# https://make.wordpress.org/core/handbook/best-practices/coding-standards/css/
# Linter documentation: http://git.io/vG7gu
# See also: http://sass-guidelin.es/
linters:
Comment:
@rudvfaden
rudvfaden / enviroment-w-comment.sublime-snippet
Created September 16, 2014 19:35
Sublime snippet for LaTeX environments with matching and self adjusting comment
<snippet>
<content><![CDATA[
%========== ${1/(.+)/\U\1/g}: ${2:Description} ==========%
\begin{${1:Environment}}
$3
\end{${1:Environment}}
%=============${1/./=/g}=${2/./=/g}============%
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>cenv</tabTrigger>
diff --git cms-page-order.php cms-page-order.php
index 51d2b9e333c3cc83c75842fbbcf7e8ab65b41e06..ddfabb28bd6dfec09067eb36f8b8a028a4678e62 100644
--- cms-page-order.php
+++ cms-page-order.php
@@ -350,15 +350,15 @@ function cmspo_do_err() {
/** Special Walker for the Pages */
class PO_Walker extends Walker_Page {
- function start_lvl(&$output, $depth) {
+ function start_lvl(&$output, $depth = 0, $args = array() ) {
@ScottPhillips
ScottPhillips / .htaccess
Created February 2, 2012 04:30
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@endolith
endolith / Has weird right-to-left characters.txt
Last active April 29, 2025 03:07
Unicode kaomoji smileys emoticons emoji
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶