update
I've created a little repository that simply exposes the final utility as npm
module.
It's called html-escaper
there is basically one rule only: do not ever replace one char after another if you are transforming a string into another.
# have drush rsync a particular file folder | |
drush rsync @dev:%files @local:%files --progress | |
# have sql-sync get the database from the server without cache | |
drush sql-sync @dev @local --no-cache | |
# have drush perform a git-pull | |
drush @site.dev gp |
dependencies[] = ctools | |
; Views Handlers | |
files[] = views/mymodule_handler_handlername.inc |
Go to menu: | |
Find -> Find in Files... (windows: ctrl+shift+f) | |
Switch on reg_ex button (windows: alt+r) | |
Find: | |
^.*\S+.*$ | |
Where: | |
c:\your_folder\,*.php,*.js,*.inc,*.html,*.htm,*.scss, -*/folder_to_exclude/*, -*.min.js |
// ---- | |
// Sass (v3.3.7) | |
// Compass (v1.0.0.alpha.18) | |
// ---- | |
.component, | |
%component { | |
content: 'component'; | |
&--variant { |
<?php | |
// improved version: https://gist.github.com/RadGH/31f16cd4705a2d8076021a9ad528f34f | |
// ---------- | |
// Example #1: HTML | |
$phone_number = '555.123.4567'; | |
echo format_phone( $phone_number ); |
update
I've created a little repository that simply exposes the final utility as npm
module.
It's called html-escaper
there is basically one rule only: do not ever replace one char after another if you are transforming a string into another.
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.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent
drush eval "var_dump(Drupal\Component\Utility\Crypt::randomBytesBase64(55))" |
// Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication | |
// http://creativecommons.org/publicdomain/zero/1.0/ | |
(function (win, doc) { | |
'use strict'; | |
if (!win.XMLHttpRequest || !win.FormData || !win.addEventListener || !doc.querySelectorAll) { | |
// doesn't cut the mustard. | |
return; | |
} | |
function hijaxForm (formElement) { | |
var progressBar; |