Skip to content

Instantly share code, notes, and snippets.

View thyagorafaell's full-sized avatar

Thyago Rafael thyagorafaell

View GitHub Profile
atom-beautify
autocomplete-modules
color-picker
editorconfig
file-icons
git-blame
git-plus
goto-definition
gulp-control
highlight-selected
<snippet>
<content><![CDATA[
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script id="setup-app-data"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
@thyagorafaell
thyagorafaell / social.html
Created June 1, 2015 13:47
Social Metatags
<!-- Facebook -->
<meta property="fb:app_id" content=""> <!-- Fb app id goes here -->
<!-- Twitter -->
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@awesomeeee">
<!-- OpenGraph (Facebook, Twitter, LinkedIn and other site uses this protocol) -->
<meta property="og:site_name" content="Name of my awesome website">
<meta property="og:locale" content="es_US">
@thyagorafaell
thyagorafaell / build.html
Created April 20, 2015 17:05
Teste de uso da ferramento gulp-inline-css para workflow de desenvolvimento de emails maketing.
<html>
<head>
<title>Teste de email com gulp-inline-css</title>
</head>
<body>
<table>
<tr>
<td>
@thyagorafaell
thyagorafaell / remove.indexeddbs.js
Created March 23, 2015 18:57
Remove indexedDbs
var removeDb = function(databaseName) {
var req = indexedDB.deleteDatabase(databaseName);
req.onsuccess = function () {
console.log("Deleted database successfully. Base" + databaseName);
};
req.onerror = function () {
console.log("Couldn't delete database. Base" + databaseName);
};
@thyagorafaell
thyagorafaell / fileuploader.css
Last active August 29, 2015 14:16
Custom input file uploader
.custom-file-uploader { opacity: 0; }
.custom-uploader-component {
cursor: pointer;
margin-top: -52px !important;
padding-top: 10px;
border-radius: 4px;
/*border: 1px solid #ffffff;*/
border: 1px solid rgba(255, 255, 255, 0.3);
height: 52px;
@thyagorafaell
thyagorafaell / radio-and-check.css
Last active August 29, 2015 14:16
Simple radio/ check button style
[type="radio"]:before {
content: ' ';
background: white;
display: block;
width: 14px;
height: 14px;
border: 1px solid red;
border-radius: 50%;
}
@thyagorafaell
thyagorafaell / jquery.validation.addmethods.ddmmyyyy.js
Created February 25, 2015 15:09
Some useful jQuery Validation methods.
(function(moment, $) {
$.validator.addMethod('datetime', function(value, element) {
if (value === '__/__/__ __:__' || value === '') {
return true;
}
return moment(value, 'DD/MM/YYYY HH:mm', true).isValid();
}, '');
$.validator.addMethod('date', function(value, element) {
@thyagorafaell
thyagorafaell / README.md
Last active August 29, 2015 14:16
jQuery Input Mask auto complete

##jQuery Input Mask auto complete

##Why?

When the user don't filling the input completely, it resets itself.

###What?

This snippet can solve this problem by filling the blank spaces with '0'.

@thyagorafaell
thyagorafaell / README.md
Last active August 29, 2015 14:15
jQuery Select2 Multiple

jQuery Select2 Multiple.

###Why?

When the multiselect tags pass the input/container width, Select2 breaks the layout and the input height.

###What?

This plugin can solve this problem by adding a 'mask' informing the number of selected tags.