Skip to content

Instantly share code, notes, and snippets.

View diogomoretti's full-sized avatar
🌎

Diogo Moretti diogomoretti

🌎
View GitHub Profile
@media screen and (-webkit-min-device-pixel-ratio:0) {
@font-face {
font-family: 'font-name';
src: url('../font/font-name.svg?#font-name') format('svg');
}
}
@diogomoretti
diogomoretti / apple-devices.html
Last active December 25, 2015 03:39
New favicons for Apple devices
<!-- non-retina iPhone pre iOS 7 -->
<link rel="apple-touch-icon" href="icon57.png" sizes="57x57">
<!-- non-retina iPad pre iOS 7 -->
<link rel="apple-touch-icon" href="icon72.png" sizes="72x72">
<!-- non-retina iPad iOS 7 -->
<link rel="apple-touch-icon" href="icon76.png" sizes="76x76">
<!-- retina iPhone pre iOS 7 -->
<link rel="apple-touch-icon" href="icon114.png" sizes="114x114">
<!-- retina iPhone iOS 7 -->
<link rel="apple-touch-icon" href="icon120.png" sizes="120x120">
@diogomoretti
diogomoretti / fonts.styl
Last active November 20, 2019 06:37
Stylus mixin @font-face
// Fonts mixin
font-url(file)
return '../fonts/' + file
webfont(family, file, hack-chrome-windows = false, weight = 'normal')
@font-face
font-family family
src url(font-url(file + '.eot'))
src url(font-url(file + '.eot?#iefix')) format('embedded-opentype'),
url(font-url(file + '.woff')) format('woff'),
@diogomoretti
diogomoretti / gh-pages-as-subfolder.sh
Created February 5, 2014 00:53
"gh-pages" branch as subfolder in github
# Make your gitHub project.
mkdir project
cd project/
git init
echo "# Project README file" > README.markdown
git add .
git commit -m "Project README added"
git remote add origin git@github.com:johndoe/project.git
git push origin master
@diogomoretti
diogomoretti / fix-jump-owl-carousel.css
Created February 7, 2014 17:53
Fix jump Owl Carousel on Chrome/Safari
@diogomoretti
diogomoretti / fix.css
Created March 4, 2014 15:40
Fix problem "inline-block + transition" in Chrome
.element-with-problem {
-webkit-backface-visibility: hidden;
-webkit-transform: translateZ(0) scale(1.0, 1.0);
}
@diogomoretti
diogomoretti / gist:10869863
Created April 16, 2014 12:54
gitignore.sublime-snippet
<snippet>
<content><![CDATA[
# Useful `.gitignore` templates:
# - https://github.com/github/gitignore
# OSX taken from: https://github.com/github/gitignore/blob/master/Global/OSX.gitignore
# ----------------------------------------------------------------------------------------------
._*
.AppleDouble
@diogomoretti
diogomoretti / clone.sh
Last active December 25, 2019 09:59
Clone repository without history
git clone --depth 1 git://github.com/example-user/example-repo.git
@diogomoretti
diogomoretti / mojave-font.md
Last active September 25, 2018 20:50
Fix MacOS Mojave font smooth
defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO
@diogomoretti
diogomoretti / meetup-draw.js
Last active October 10, 2019 04:06
Meetup Draw
// Example: https://www.meetup.com/floripajs/events/265094805/attendees
document.querySelector('.attendees-list').querySelectorAll('li')[Math.floor(Math.random() * document.querySelector('.attendees-list').querySelectorAll('li').length) + 1].querySelector('h4').textContent