Skip to content

Instantly share code, notes, and snippets.

View felquis's full-sized avatar
🔎
aligning divs with style

Felquis G felquis

🔎
aligning divs with style
View GitHub Profile
@felquis
felquis / IEImageRotate.js
Created March 8, 2012 20:55
Faz uns calculos para aplicar o Matrix e rotacionar elementos no Internet Explorer
// 08/03/2012, 16:59 - ICOMP
// Simple Rotate Elements in IE
// by @felquis
// Thanks for Lucio, Etiqueta
window.globalVars = {rotatePI : Math.PI * 2 / 360};
$(window).load(function(){
$('[data-rotate]').each(function(i, obj){
// Valor do deg
var $obj = $(obj),
rotate = $obj.css('transform').replace(/rotate\((\-?[0-9]{1,})deg\)/i, '$1'),
@felquis
felquis / dabblet.css
Created April 3, 2012 06:19
Teste com transition
/**
* Teste com transition
*/
a {
display:inline-block;
height:50px;
background: #f06;
transition: background 1s ease-in;
@felquis
felquis / bambi.arra.js
Created April 26, 2012 05:10
Uma grande gambiarra pra trocar o src das imagens que estavam vindo erradas, já que a as imagens são adicionadas pelo backEnd e ele não estava disponível na hora, eu tive que improvisar por que era urgente kkk deu certo!
// Minha maior gambiarra
$('img').each(function (i, e) {
var $this = $(e),
src = $this.attr('src');
if (src.indexOf('/home/lol/public_html/') != -1){
$(this).attr('src', src.replace('/home/lol/public_html/', ''));
}
});
@felquis
felquis / JSFuck.txt
Created September 5, 2012 04:42
Uma mensagem para todos meus queridos amigos, do fundo do meu coração.
[][(![]+[])[+[[+[]]]]+([][[]]+[])[+[[!+[]+!+[]+!+[]+!+[]+!+[]]]]+(![]+[])[+[[!+[]+!+[]]]]+(!![]+[])[+[[+[]]]]+(!![]+[])[+[[!+[]+!+[]+!+[]]]]+(!![]+[])[+[[+!+[]]]]][([][(![]+[])[+[[+[]]]]+([][[]]+[])[+[[!+[]+!+[]+!+[]+!+[]+!+[]]]]+(![]+[])[+[[!+[]+!+[]]]]+(!![]+[])[+[[+[]]]]+(!![]+[])[+[[!+[]+!+[]+!+[]]]]+(!![]+[])[+[[+!+[]]]]]+[])[+[[!+[]+!+[]+!+[]]]]+([][(![]+[])[+[[+[]]]]+([][[]]+[])[+[[!+[]+!+[]+!+[]+!+[]+!+[]]]]+(![]+[])[+[[!+[]+!+[]]]]+(!![]+[])[+[[+[]]]]+(!![]+[])[+[[!+[]+!+[]+!+[]]]]+(!![]+[])[+[[+!+[]]]]]+[])[+[[!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]]]+([][[]]+[])[+[[+!+[]]]]+(![]+[])[+[[!+[]+!+[]+!+[]]]]+(!![]+[])[+[[+[]]]]+(!![]+[])[+[[+!+[]]]]+([][[]]+[])[+[[+[]]]]+([][(![]+[])[+[[+[]]]]+([][[]]+[])[+[[!+[]+!+[]+!+[]+!+[]+!+[]]]]+(![]+[])[+[[!+[]+!+[]]]]+(!![]+[])[+[[+[]]]]+(!![]+[])[+[[!+[]+!+[]+!+[]]]]+(!![]+[])[+[[+!+[]]]]]+[])[+[[!+[]+!+[]+!+[]]]]+(!![]+[])[+[[+[]]]]+([][(![]+[])[+[[+[]]]]+([][[]]+[])[+[[!+[]+!+[]+!+[]+!+[]+!+[]]]]+(![]+[])[+[[!+[]+!+[]]]]+(!![]+[])[+[[+[]]]]+(!![]+[])[+[[!+[]+!+[]+!+[
@felquis
felquis / js
Created September 8, 2012 18:13
Um teste qualquer..
;(function () {
var Plusplus = function (init) {
// Verifica se foi usado new
if ( !(this instanceof Plusplus) ) {
return new Plusplus(init);
}
// Minha variável de ouro
var number = init || 0;
@felquis
felquis / busca.js
Created October 4, 2012 16:37
Busca por string em uma string que representa um JSON.
// Buscar o que?
var busquePor = '',
json = "{1:'Ofelquis',2:'Diego',3:'Vanessa',4:'Rennan',5:'Thiago',6:'André',7:'Caio',8:'Vagner',9:'Lucio',10:'Dhiego'}",
regex = RegExp('[^{:,]+:[\'"]([^\'"]*' + busquePor + '[^\'"]*)[\'"]', 'gi'),
html = '';
json.match(regex).forEach(function (a) {
html += a+'<br />';
});
@felquis
felquis / if-else-if.py
Created November 2, 2012 05:00
If e else if em Python
# Um tipico if no Python
if (1 < 2) :
print "Menor que 2"
# Um tipico if com else no Python
if (2 == 1) :
print "Igual \o/"
else :
print "Não é igual :("
@felquis
felquis / dabblet.css
Created November 8, 2012 12:51
Gradient background from black to transparent
/**
* Gradient background from black to transparent
*/
body {
background: url(http://sphotos-a.ak.fbcdn.net/hphotos-ak-ash4/398156_269511963103640_1888402038_n.jpg) 0 0 no-repeat;
background-size: 100% 100%;
}
.ofelquis {
@felquis
felquis / top-portfolio-front-end.md
Last active April 24, 2024 19:19
Portifólios legais de desenvolvedores Front-end que encontrei por ai

Developer's Web Sites, Portfolio and blogs

Os links aqui estão sem nenhum tipo de ordenação, então o que esta por ultimo não é necessariamente o mais ruim na minha opinião e o que esta primeiro não necessariamente é o melhor, sabendo disso, vamos a lista.

@felquis
felquis / file.js
Last active October 13, 2015 17:58
Cancela o Scroll no Window, quando estiver em um elemento que esta usando o plugin jScrollPane...
$('content-scroll').hover(function () {
$(window).on('mousewheel.cancelWindowScroll', function (e) {
e.preventDefault();
});
}, function () {
$(window).off('mousewheel.cancelWindowScroll');
});