Skip to content

Instantly share code, notes, and snippets.

View allanbatista's full-sized avatar

Allan Batista allanbatista

View GitHub Profile
@allanbatista
allanbatista / index.html
Last active January 3, 2016 14:19
Configuração do index.html para webapp funcionar com multiplas versoes de componenets distindos para atender melhor browsers diferentes.
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<title>portal revendedor</title>
<meta name="description" content="IE=edge,chrome=1">
@allanbatista
allanbatista / Gruntfile.js
Created February 7, 2014 19:17
Configuração do gruntfile com yeoman para trabalhar com templates
// Generated on 2014-01-29 using generator-webapp 0.4.7
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'
module.exports = function (grunt) {
/* Generated by Font Squirrel (http://www.fontsquirrel.com) on January 28, 2014 */
@font-face {
font-family: 'odebrechtsans';
src: url('fonts/odebrecht-sans-webfont.eot');
src: url('fonts/odebrecht-sans-webfont.eot?#iefix') format('embedded-opentype'),
url('fonts/odebrecht-sans-webfont.woff') format('woff'),
url('fonts/odebrecht-sans-webfont.ttf') format('truetype'),
url('fonts/odebrecht-sans-webfont.svg#odebrechtsans') format('svg');
font-weight: normal;
font-style: normal;
a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font:inherit;font-size:100%;vertical-align:baseline}html{line-height:1}ol,ul{list-style:none}table{border-collapse:collapse;border-spacing:0}caption,td,th{text-align:left;font-weight:400;vertical-align:middle}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:"";content:none}a img{border:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary{display:block}
@allanbatista
allanbatista / Comandos Uteis
Last active August 29, 2015 14:00
Ubuntu 14.04 developer machine
// NPM : Instalar um gerador para o yeoman
$ sudo npm install generator-nome -g
// NPM : Pesquisar por um gerador
$ npm search generator-nome
$ npm search generator-n* // pesquisa por todos os geradores que começão com a letra n
// Yeoman : Instalar gerador
$ yo // Vai exibir todos os geradores instalados
$ yo webapp // instala o gerador de nome webapp
@allanbatista
allanbatista / install-phonegap-ubuntu-14.04
Last active August 29, 2015 14:00
Instalação phonegap ubuntu 14.04
# Instalação das dependencias
sudo apt-get install openjdk-7-jdk
sudo apt-get install ant
# Em sistemas x64 instale
sudo apt-get install lib32std++
# instalacao do phonegap
sudo npm install phonegap
@allanbatista
allanbatista / webapp-ifconficional
Created April 28, 2014 18:03
utilizacao de scripts para browsers modernos e browsers antigos no grunt.
<!-- build:js({app,.tmp}) scripts/capacete-old.js -->
<!--[if lt IE 9]>
<script src="scripts/para/ie8/ou/menor"></script>
<![endif]-->
<!-- endbuild -->
<!--[if gt IE 8]><!-->
<!-- build:js({app,.tmp}) scripts/capacete.js -->
<script src="scripts/para/browsers/modernos"></script>
<!-- endbuild -->
<!--<![endif]-->
@allanbatista
allanbatista / Instalação via ssh
Last active August 29, 2015 14:01
script-bkp-mysql.sh
$ scp script-bkp-mysql.sh root@host:/root
$ ssh root@host
$ chmod +x script-bkp-mysql.sh
# MINUTO HORA DIA MES DIASEMANA USER SCRIPT
$ echo "0 0 * * * root sh /root/script-bkp-mysql.sh" >> /etc/crontab
// PopupIsAvalible( open('http://placehod.it/','name','height=200,width=150'), function(){} );
var PopupIsAvalible = function(popup, callback) {
var works = popup ? true : false;
if( typeof callback === "function" && works ) callback();
return works;
};
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.2'
# Use sqlite3 as the database for Active Record
group :development, :test do
gem 'net-ssh', '2.7.0'
gem 'sqlite3'
end