Skip to content

Instantly share code, notes, and snippets.

View AlexLaforge's full-sized avatar

Alex Laforge AlexLaforge

  • Reims, France.
View GitHub Profile
@abelcheung
abelcheung / firefox-viewsource-customize.md
Last active May 28, 2023 18:18
Customizing Firefox view-source style -- Solarized Dark theme with wallpaper

Customizing Firefox view-source style

TL;DR

  1. Open (or create) chrome/userContent.css under your Firefox profile folder
  2. Append attached CSS content and save file
  3. Toggle toolkit.legacyUserProfileCustomizations.stylesheets in Firefox about:config
  4. Restart Firefox

firefox view-source style customization

@simply-coded
simply-coded / BrowseForFile.md
Last active September 5, 2020 14:27
Browse for file dialog box in VBScript.
@paulirish
paulirish / what-forces-layout.md
Last active April 30, 2024 17:56
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
@gwobcke
gwobcke / URLDecode.asp
Last active June 21, 2023 09:38
ASP seems to lack a URL Decode function but has a URL Encode function available. Here is a function that can decode any URL Encoded URL or variable.
<%
FUNCTION URLDecoder(str)
'// This function:
'// - decodes any utf-8 encoded characters into unicode characters eg. (%C3%A5 = å)
'// - replaces any plus sign separators with a space character
'//
'// IMPORTANT:
'// Your webpage must use the UTF-8 character set. Easiest method is to use this META tag:
'// <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
'//
@mlhaufe
mlhaufe / parameters.vbs
Created June 19, 2011 12:52
VBScript class constructor parameters
Class Person
Private m_Age
Private m_Name
Public Default Function Init(Name, Age)
m_Name = Name
m_Age = Age
Set Init = Me
End Function