Skip to content

Instantly share code, notes, and snippets.

@tonysaffo
tonysaffo / VSConfig.json
Created May 14, 2018 08:26
VSCode Config
{
"editor.tabSize": 2,
"editor.multiCursorModifier": "ctrlCmd",
"editor.autoIndent": false,
"editor.detectIndentation": false,
"editor.fontSize": 10,
"files.defaultLanguage": "html",
"workbench.editor.tabSizing": "shrink",
"editor.insertSpaces": false,
"editor.glyphMargin": false,
@tonysaffo
tonysaffo / npm commands
Last active November 2, 2018 09:20
Npm update packages and install
sudo npm i -g npm-check-updates // utility for updating npm packages
sudo npm i -g npm // updating npm
ncu -u // check all updates
sudo npm install --unsafe-perm=true --allow-root // npm i
sudo npm audit fix // npm vulnerable fixes
@tonysaffo
tonysaffo / RealtimeSearching.js
Created May 16, 2018 17:08
RealtimeSearching
$('.article-features__other .hidden-block .hidden-block__header input').keyup(function() {
var str = $(this).val();
$(this).parents('.hidden-block').find('ul li').each(function(){
if ($(this).text().search(new RegExp(str, "i")) < 0)
$(this).hide();
else
$(this).show();
});
});
@tonysaffo
tonysaffo / iframe-google.html
Created May 25, 2018 11:35
Google Iframe zooming parameter
<iframe src="https://www.google.com/maps/d/embed?mid=1bSPMghQymlJVCCKtNjQe6DZioz0cq9nq&z=4" width="100%" height="480"></iframe>
@tonysaffo
tonysaffo / letter-spacing-fix.css
Created May 26, 2018 08:23
Letter Spacing Fix Css
letter-spacing: 15px
margin-right: -15px
text-align: right
@tonysaffo
tonysaffo / letter.html
Last active September 25, 2018 12:47
letter
<html>
<head>
<title></title>
</head>
<body>
<p>Skip to content Search&hellip; All gists GitHub New gist @Saffochoice We are having a problem billing your account. Please update your payment method or call your payment provider for details on why the transaction failed. Your private repositories have been locked until you fix this error. Thanks for understanding. You can contact support with any questions. 0 @SaffochoiceSaffochoice/letter.html Created 17 minutes ago Code Revisions 1 letter letter.html</p>
<meta name="viewport" content="width=400"></body>
</html>
<title></title>
<link href="https://tilda.ws/img/tildafavicon.ico" rel="shortcut icon" />
&:after
z-index: 1
content: ''
position: absolute
width: 10px
height: 45px
background-color: $turquoise
left: 20px
top: 40px
&:last-of-type
// HAMBURGER
$('.hamburger').click(function(){
$(this).toggleClass('is-active');
$('.hidden-mobile-nav').slideToggle();
document.ontouchmove = function(event){
event.preventDefault();
}
if($(this).hasClass('is-active')) {
$('body').css({
'overflow': 'hidden',
$('.rating-block .item').click(function(){
$(this).toggleClass('selected').siblings('.item').removeClass('selected');
});
function scrollTo(el) {
$('.hamburger').removeClass('is-active');
$('.hidden-mobile-nav').slideUp();
$('body').css({
'overflow': 'auto',
});
document.ontouchmove = function(e){ return true; };
$('html, body').animate({
scrollTop: el.offset().top - 50
}, 400);