Skip to content

Instantly share code, notes, and snippets.

View chrisgfortes's full-sized avatar

Christian Fortes chrisgfortes

View GitHub Profile
@chrisgfortes
chrisgfortes / hideText
Last active August 29, 2015 14:20
Replacing Text / Hide
.hide-text {
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
}
// Remove box-Sizing in browser
*, *:before, *:after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
// Remove border focus browser
*:focus {
outline-style: none;
@chrisgfortes
chrisgfortes / GitHub Ribbons
Last active August 29, 2015 14:20
GitHub Ribbons
Banderinhas do github de fork no projeto: https://github.com/blog/273-github-ribbons
@chrisgfortes
chrisgfortes / comece-a-programar-para-ios
Created May 5, 2015 20:03
Comece a programar para ios
http://flaviosilveira.com/2013/comece-a-programar-para-ios/
http://flaviosilveira.com/2013/objective-c-a-linguagem-por-tras-do-ios-parte-1/
http://flaviosilveira.com/2013/objective-c-a-linguagem-por-tras-do-ios-parte-2/
@chrisgfortes
chrisgfortes / Create Comments Facebook Dynamic
Last active August 29, 2015 14:24
Create Comments Facebook Dynamic
<a href="#" class="add">Adicionar</a>
<div class="comments"></div>
<script type="text/javascript" src="bower_components/jquery/dist/jquery.min.js"></script>
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/pt_BR/sdk.js#xfbml=1&version=v2.4&appId=1575883519346379";
@chrisgfortes
chrisgfortes / Read Image Upload
Created July 24, 2015 19:20
Ler imagem e mostrar preview sem upload do arquivo, somente client
<img id="preview" src="placeholder.png" height="100px" width="100px" />
<input type="file" name="image" onchange="previewImage(this)" accept="image/*"/>
<script type="text/javascript">
function previewImage(input) {
var preview = document.getElementById('preview');
if (input.files && input.files[0]) {
var reader = new FileReader();
reader.onload = function (e) {
preview.setAttribute('src', e.target.result);
@chrisgfortes
chrisgfortes / Default (Windows).sublime-keymap
Last active October 5, 2016 13:52
Configuração sublime text
[
{"keys": ["ctrl+k"], "command": "rename_tag"},
{ "keys": ["ctrl+up"], "command": "select_lines", "args": {"forward": false} },
{ "keys": ["ctrl+down"], "command": "select_lines", "args": {"forward": true} },
{ "keys": ["ctrl+alt+minus"], "command": "jump_back" },
{ "keys": ["ctrl+alt+upwards"], "command": "jump_forward" },
{ "keys": ["ctrl+;"], "command": "toggle_comment", "args": { "block": true } }
]
@chrisgfortes
chrisgfortes / read_and_write_elements.txt
Created October 8, 2015 17:55
Leitura ou Escrita em elementos html
// Para escrever em uma div tem que ser usado o atributo:
contenteditable="true"
// Para permitir só visualizar um dado no input usar o atributo:
readonly="readonly"
@chrisgfortes
chrisgfortes / scroll.js
Created October 15, 2015 17:54
Bloqueando e desbloqueando o scroll jquery
// Bloqueia o scroll da tela
$('body').on("scroll mousewheel DOMMouseScroll", function(e) {
e.preventDefault();
e.stopPropagation();
});
// Desbloqueia o scroll da tela
$('body').on("scroll mousewheel DOMMouseScroll", function(e){
$(this).unbind("mousewheel");
});
@chrisgfortes
chrisgfortes / README.md
Last active December 2, 2015 14:20
Pseudo rules css

CSS Selector Reference


Example description
Selector Example