Skip to content

Instantly share code, notes, and snippets.

View ricardodantas's full-sized avatar

Ricardo Dantas ricardodantas

View GitHub Profile
# ----------------------------------------------------------------------
# /PUBLIC folder .htaccess
# ----------------------------------------------------------------------
# This .htaccess file is recommended
# to be placed at root/public folder
# of your Laravel powered application
# ----------------------------------------------------------------------
# This file works with Laravel 3 and 4
# ----------------------------------------------------------------------
# Turning on the rewrite engine is necessary for the following rules and
@ricardodantas
ricardodantas / git-rollback-remote
Created March 28, 2014 02:18
Git rollback on remote.
git push -f origin has_to_rollback:master
git tag -d 12345
git push origin :refs/tags/12345
@ricardodantas
ricardodantas / SassMeister-input.scss
Created May 26, 2014 15:37
Generated by SassMeister.com.
// ----
// Sass (v3.3.7)
// Compass (v1.0.0.alpha.18)
// ----
$colors:(Branco: #f0f0f0, Preto: #000, Amarelo: #f6dd34,Azul: #5c6fcf,Bege: #d9cc9e,Cinza: #969696,Laranja: #e36139,Marrom: #7d4f3f,Rosa: #c8418c,Roxo: #543c94,Verde: #007831,Vermelho: #c11300);
@each $name, $color in $colors{
.#{$name}{
background-color: $color;
}
jQuery.fn.brTelMask = function() {
return this.each(function(){
var el = this;
$(el).focus(function(){
$(el).mask("(99) 9999-9999?9");
});
$(el).focusout(function(){
var phone, element;
@ricardodantas
ricardodantas / sample.css
Created September 4, 2014 18:01
Centralizar verticalmente e horizontalmente elementos (css/html) --- From http://css-tricks.com/centering-css-complete-guide/
.parent { position: relative; }
.child { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
$.getJSON('https://gdata.youtube.com/feeds/api/videos?q=googledevelopers&max-re‌​sults=5&v=2&alt=jsonc&orderby=published', function(data) {
console.log(data);
for(var i=0; i<data.data.items.length; i++) {
console.log(data.data.items[i].title); // title
console.log(data.data.items[i].description); // description
}
});
@ricardodantas
ricardodantas / whatsapp.txt
Created October 8, 2014 18:57
Share button from whatsapp
whatsapp://send?text=Acesse%20o%20nosso%20site: http%3A%2F%2Flazzariagenciaweb.com.br%2Fblog
define(function (require) {
var module;
// Setup temporary Google Analytics objects.
window.GoogleAnalyticsObject = "ga";
window.ga = function () { (window.ga.q = window.ga.q || []).push(arguments); };
window.ga.l = 1 * new Date();
// Immediately add a pageview event to the queue.
@ricardodantas
ricardodantas / mobify-bower.js
Created November 15, 2014 04:36
A bower.json bootstrap for Mobify projects.
{
"name": "PROJECTNAME-mobile",
"version": "1.0.0",
"dependencies": {
"imageresize": "git://github.com/mobify/imageresize-client.git#1.0.2",
"devicejs": "git://github.com/mobify/device.js.git#0.1.59",
"dustjs-linkedin": "2.3.3",
"spline": "~0.4",
"modularized-normalize-scss": "3.0.1",
"pre-tag": "http://cdn.mobify.com/arnie/arnie-tag-v1.min.js",