Skip to content

Instantly share code, notes, and snippets.

View uhtred's full-sized avatar

Daniel França uhtred

View GitHub Profile
@uhtred
uhtred / hemocentros.js
Created March 19, 2013 01:37
migração hemocentro
var hemos = [];
function parseFone( fone ) {
fone = fone||'';
return $.trim( fone.replace(/Fone:|Fax:|PABX:|Fone\/Fax:/, '') );
}
function isFone( fone ) {
fone = fone||'';
return /Fone|Fax|PABX|Fone\/Fax/.test( fone );
@uhtred
uhtred / placeholdit.php
Created March 20, 2013 21:12
PHP: Placehold it image
<?php
/*
How to use
/940x278
/940x278/000000
/940x278&text=Texto
/940x278/000000&text=Texto
RewriteEngine On
@uhtred
uhtred / list-port-apps
Created April 17, 2013 20:21
CMD: Lista aplicativos usando determinada porta.
Lista os aplicativos usando determinada porta.
netstat -ab | findstr {port}
@uhtred
uhtred / gist:5414662
Created April 18, 2013 17:37
BUG: IE conditional comments around html tag adds Compat View icon to address bar
https://github.com/h5bp/html5-boilerplate/issues/378
@uhtred
uhtred / comentario-condicional.html
Created May 3, 2013 21:44
JS: Comentário condicional para jQuery 2.0
<!--[if lt IE 9]>
<script src="jquery-1.9.1.min.js"></script>
<![endif]-->
<!--[if (gte IE 9) | (!IE)]><!-->
<script src="jquery-2.0.0.min.js"></script>
<!--<![endif]-->
@uhtred
uhtred / requestAnimationFram-polyfill.js
Created May 6, 2013 12:18
JS: requestAnimationFram polyfill
(function() {
var lastTime = 0;
var vendors = ['webkit', 'moz'];
for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame'];
window.cancelAnimationFrame =
window[vendors[x]+'CancelAnimationFrame'] || window[vendors[x]+'CancelRequestAnimationFrame'];
}
if (!window.requestAnimationFrame)
@uhtred
uhtred / box-sizing
Created May 10, 2013 14:14
CSS: Box sizing with border
*{ -moz-box-sizing:border-box;- webkit-box-sizing:border-box; box-sizing:border-box; }
@uhtred
uhtred / scrollbar.html
Last active December 17, 2015 11:28
Plugin: View Only Custom Scrollbar
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.css">
<style>
#container{
width: 300px;
height: 200px;
@uhtred
uhtred / jquery.scrollbar.js
Created May 24, 2013 22:01
Plugin: Scrollbar
;(function ( $, window, undefined ) {
// Create the defaults once
var pluginName = 'scrollbar',
document = window.document,
defaults = {
speed: 10
};
// The actual plugin constructor
@uhtred
uhtred / fit-boxes.html
Created May 29, 2013 13:12
Test: Fit Boxes
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<link rel="stylesheet" href="Resources/reset.css">
<style>
.container{
width: 600px;
height: 500px;