Skip to content

Instantly share code, notes, and snippets.

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

Simon Mayerhofer SimonMayerhofer

🕶️
'sup?
View GitHub Profile
@endolith
endolith / Has weird right-to-left characters.txt
Last active June 1, 2024 10:58
Unicode kaomoji smileys emoticons emoji
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
@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/
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() ) {
@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>
# 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:
@paulirish
paulirish / what-forces-layout.md
Last active June 19, 2024 15:52
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
@simonw
simonw / remove-message.js
Last active March 6, 2023 08:40
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(/^&/, '?')
);

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

Aligning images

This is a guide for aligning images.

See the full Advanced Markdown doc for more tips and tricks

left alignment

@oshliaer
oshliaer / .how_to_concatenate_ranges_in_google_spreadsheets.md
Last active March 4, 2022 13:57
How to concatenate ranges in Google spreadsheets

How to concatenate ranges in Google spreadsheets

Unsplash

Sometimes it is necessary to concat ranges in Google Spreadsheet. Eg, Data 1 and Data 2

Sheet Data 1

Name Date Sum
Ethan 3/4/2017 31