Skip to content

Instantly share code, notes, and snippets.

View manfromanotherland's full-sized avatar
🤏

Edmundo Santos manfromanotherland

🤏
View GitHub Profile
@manfromanotherland
manfromanotherland / facebook.html
Created May 13, 2015 20:17
JS: Embed Facebook last image #snippet
<div id="facefeed">
<!-- images will appear here -->
</div>
@manfromanotherland
manfromanotherland / font-smoothing.scss
Created April 15, 2015 19:45
SCSS: Font smoothing mixin for SASS #snippet
@mixin font-smoothing {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
@manfromanotherland
manfromanotherland / respond-to.scss
Created April 13, 2015 11:46
SASS: Manage responsive breakpoints #snippet
// Manage responsive breakpoints
// @require $mobile
// @example
// .element {
// /* default styles */
// @include respond-to(mobile) { /* styles just for mobile */ }
// @include respond-to(desktop) { /* styles just for desktop */ }
// }
@mixin respond-to($media) {
@manfromanotherland
manfromanotherland / formspree.html
Last active July 3, 2024 14:24
JS: Ajax send forms using the most excellent Formspree » http://formspree.io #snippet
<form id="contact-form" action="//formspree.io/[email protected]" method="post">
<input type="text" name="Name" placeholder="Name" required>
<input type="email" name="Email" placeholder="Email" required>
<textarea name="Message" cols="30" rows="6" placeholder="Message" required></textarea>
<!-- CONFIG -->
<input class="is-hidden" type="text" name="_gotcha">
<input type="hidden" name="_subject" value="Subject">
<input type="hidden" name="_cc" value="[email protected]">
<!-- /CONFIG -->
<input class="submit" type="submit" value="Send">
@manfromanotherland
manfromanotherland / fixe.css
Last active September 9, 2016 08:34
HTML, CSS: Fixe website signature » fixeideias.com.br #snippet
/*
* Fixe Ideias icon
* fixeideias.com.br
*/
.fixe {
position: absolute;
top: 50%;
right: 0;
margin-top: -15px;
@manfromanotherland
manfromanotherland / .htaccess
Created March 10, 2015 12:05
.htaccess: Temporary redirect to /dir with IP rule #snippet
# ----------------------------------------------------------------------
# TEMP REDIRECT TO /DIR
# ----------------------------------------------------------------------
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REMOTE_ADDR} !^192\.168\.0\.1
RewriteCond %{REQUEST_URI} !/DIR$ [NC]
RewriteCond %{REQUEST_URI} !\.(jpe?g?|png|gif) [NC]
RewriteRule .* /DIR [R=302,L]
@manfromanotherland
manfromanotherland / .htaccess
Created March 10, 2015 11:48
.htaccess: Permanent redirect to directory #snippet
# ----------------------------------------------------------------------
# REDIRECT TO /DIR
# ----------------------------------------------------------------------
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^$ http://domain.com/dir [L]
</IfModule>
@manfromanotherland
manfromanotherland / magnific-popup-pt.js
Last active June 9, 2021 16:25
JS: Magnific Popup Portuguese translation #snippet
$('.magnific-portuguese').magnificPopup({
tClose: 'Fechar',
tLoading: 'Carregando...',
gallery: {
tPrev: 'Anterior',
tNext: 'Próxima',
tCounter: '%curr% de %total%'
},
image: {
tError: '<a href="%url%">A imagem</a> não pode ser carregada.'
@manfromanotherland
manfromanotherland / .htaccess
Last active August 29, 2015 14:16
.htaccess: from HTML5 Boilerplate #snippet
# Apache Server Configs v2.13.0 | MIT License
# https://github.com/h5bp/server-configs-apache
# (!) Using `.htaccess` files slows down Apache, therefore, if you have
# access to the main server configuration file (which is usually called
# `httpd.conf`), you should add this logic there.
#
# https://httpd.apache.org/docs/current/howto/htaccess.html.
# ######################################################################
@manfromanotherland
manfromanotherland / select-brasil.html
Last active July 1, 2020 15:18
HTML: select com todos os Estados Brasileiros #snippet
<label for="estados-brasileiros">Estados</label>
<select name="estados-brasileiros" id="estados-brasileiros">
<option value="ac">Acre</option>
<option value="al">Alagoas</option>
<option value="ap">Amapá</option>
<option value="am">Amazonas</option>
<option value="ba">Bahia</option>
<option value="ce">Ceará</option>
<option value="df">Distrito Federal</option>
<option value="es">Espírito Santo</option>