Skip to content

Instantly share code, notes, and snippets.

View renatomattos2912's full-sized avatar

Renato Mattos renatomattos2912

View GitHub Profile
@renatomattos2912
renatomattos2912 / gist:9296878
Created March 1, 2014 20:38
Cors Action Play 2.2.1
package actions;
import java.lang.annotation.*;
import play.libs.F.Promise;
import play.mvc.*;
import play.mvc.Http.Context;
import play.mvc.Http.*;
public class CorsComposition {
@renatomattos2912
renatomattos2912 / new_gist_file_0
Created March 1, 2014 20:51
SCP with port on terminal
spc -P 1234 user@[ip address or host name]:/var/www/mywebsite/dumps/* /var/www/myNewPathOnCurrentLocalMachine
sudo scp -P 2222 id_rsa id_rsa.pub vagrant@localhost:~/.ssh
git rm -r --cached .
git add .
git commit -m "text"
git push origin <branch>
git chekout <branch>
// register a user on git
git config --global user.name "Your Name"
git config --global user.email [email protected]
@renatomattos2912
renatomattos2912 / unzip tar.gz
Created March 3, 2014 16:52
Unzip tar.gz on mac from terminal
gunzip -c foo.tar.gz | tar xopf -
@renatomattos2912
renatomattos2912 / play-pag34-finder.java
Created March 14, 2014 00:42
Sugestão de correção para o livro play framework da casa do codigo
// VERSAO DO LIVRO
@Entity
public class Diretor extends Model{
private static final long serialVersionUID = 1L;
@Id
public Long id;
@Constraints.Required
@renatomattos2912
renatomattos2912 / CorsComposition.java
Created March 28, 2014 22:56
CORS Implementation
package actions;
import java.lang.annotation.*;
import play.libs.F.Promise;
import play.mvc.*;
import play.mvc.Http.Context;
import play.mvc.Http.*;
public class CorsComposition {
@renatomattos2912
renatomattos2912 / favicons.html
Created April 5, 2014 06:39
Favicons necessarios em sites
<link rel="icon" href="/img/favicon/favicon-16.png" sizes="16x16">
<link rel="icon" href="/img/favicon/favicon-32.png" sizes="32x32">
<link rel="icon" href="/img/favicon/favicon-48.png" sizes="48x48">
<link rel="icon" href="/img/favicon/favicon-64.png" sizes="64x64">
<link rel="icon" href="/img/favicon/favicon-128.png" sizes="128x128">
<!-- iPad iOS7+ com Retina Display -->
<link rel="apple-touch-icon" sizes="152x152" href="/img/favicon/apple-touch-icon-152x152.png">
<!-- iPad iOS7- com Retina Display -->
<link rel="apple-touch-icon" sizes="144x144" href="/img/favicon/apple-touch-icon-144x144.png">
@renatomattos2912
renatomattos2912 / gitignore front
Created April 11, 2014 23:10
gitigonore para front end
# Folders
_site/
node_modules/
tmp/
.tmp/
build/
.vagrant/
log/
.log/
$RECYCLE.BIN/
@renatomattos2912
renatomattos2912 / flatify-navbar
Last active August 29, 2015 14:02
Flatify navbar problem
<div id="nav-wrapper" data-ng-controller="CategoriaCtrl">
<ul id="nav" data-collapse-nav data-slim-scroll data-highlight-active>
<li ng-repeat="(categoriaId, categoria) in categorias">
<a href>
<i class="fa {{categoria.icone}}">
<span class="icon-bg bg-warning"></span></i>{{categoria.nome}}
</a>
<ul>