This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Here is an example of bulletproof background in emails for Gmail, Windows Mail, etc. and especially for Outlook. | |
It works with attribute "background" of td and fallback in VML for Outlook. | |
<table cellpadding="0" cellspacing="0" border="0" width="100%"> | |
<tr> | |
<td background="https://i.imgur.com/YJOX1PC.png" bgcolor="#7bceeb" valign="top"> | |
<!--[if gte mso 9]> | |
<v:rect xmlns_v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="mso-width-percent:1000;"> | |
<v:fill type="tile" src="https://i.imgur.com/YJOX1PC.png" color="#7bceeb" /> | |
<v:textbox style="mso-fit-shape-to-text:true" inset="0,0,0,0"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
parserOptions: { | |
ecmaVersion: 2019, | |
sourceType: 'module' | |
}, | |
env: { | |
es6: true, | |
browser: true | |
}, | |
extends: [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const getPurePhone = (value) => { | |
if (!value) { | |
return ''; | |
} | |
return value.replace(/\+7|[^\d]/g, '') | |
.replace(/^8(\d{10})$/, '$1'); | |
} | |
const phoneMask = (value) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# OpenSSL configuration to generate a new key with signing requst for a x509v3 | |
# multidomain certificate | |
# | |
# openssl req -config bla.cnf -new | tee csr.pem | |
# or | |
# openssl req -config bla.cnf -new -out csr.pem | |
[ req ] | |
default_bits = 4096 | |
default_md = sha512 | |
default_keyfile = key.pem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# setup oh-my-zshell | |
# setup Sublime Text 3 | |
mkdir ~/bin | |
ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" ~/bin/subl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
span:not(:empty) + span:not(:empty):before { | |
content: ', '; | |
} | |
</style> | |
<span>+7 (985) 171-71-71</span><span>[email protected]</span> | |
<!-- | |
Outputs to ===> +7 (985) 171-71-71, [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Problems with inactive margin of elements inside flexbox. | |
Solution: Add pseudo-element ::after like | |
.element::after { | |
content: ''; | |
display: block; | |
height: 20px; | |
} | |
2. Undesired phone number detection on a page with odd styling. | |
Solution: Add meta into head - <meta name="format-detection" content="telephone=no">. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If you come from bash you might have to change your $PATH. | |
export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH="${HOME}/.oh-my-zsh" | |
# Set name of the theme to load --- if set to "random", it will | |
# load a random theme each time oh-my-zsh is loaded, in which case, | |
# to know which specific one was loaded, run: echo $RANDOM_THEME | |
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -e | |
# 1) Disable of gnome control over keyboard: | |
gsettings set org.gnome.settings-daemon.plugins.keyboard active false | |
# 2) Set desired settings for xkb: | |
setxkbmap -option grp:rctrl_toggle,lv3:menu_switch us,ru |
NewerOlder