Skip to content

Instantly share code, notes, and snippets.

View victorjspinto's full-sized avatar

Victor Jose Silva Pinto victorjspinto

  • Rio de Janeiro, RJ
View GitHub Profile
habilitar debug android
- clicar na versão algumas vezes
adb reboot bootloader
https://motorola-global-portal.custhelp.com/app/standalone/bootloader/unlock-your-device-a
Install twrp
- fastboot flash recovery twrp-3.1.1-0-athene.img
@victorjspinto
victorjspinto / samples.sh
Created September 13, 2017 19:39
Bash samples
#!/bin/bash
for i in {1..99..2}
do
echo "$i"
done
#!/bin/bash
# Read input name and display message
read name # ler input do usuário até o [ENTER]
package com.springaction.knights;
public class BraveKnight implements Knight {
private Quest quest;
private Minstrel minstrel;
public BraveKnight(Quest quest, Minstrel minstrel) {
this.quest = quest;
this.minstrel = minstrel;
@victorjspinto
victorjspinto / gist:0b9d21c8f08272f69a0e
Created October 2, 2015 05:40
Enable public access S3
{
"Version":"2012-10-17",
"Statement": [{
"Sid": "Allow Public Access to All Objects",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::example.com/*"
}
]
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<select id="paises"></select>
<select id="cidades"></select>
@victorjspinto
victorjspinto / spring-example.xml
Last active August 31, 2015 23:57
Enable non-blocking Spring Application Events
<bean id="applicationEventMulticaster"
class="org.springframework.context.event.SimpleApplicationEventMulticaster">
<property name="taskExecutor" >
<bean class="org.springframework.core.task.SimpleAsyncTaskExecutor">
</bean>
</property>
</bean
@victorjspinto
victorjspinto / gist:1a13317aaae23fd32d06
Created May 21, 2015 18:15
Write git hash revision on file with grunt
grunt.registerTask('tag-revision', 'Tag the current build revision', function () {
grunt.task.requires('git-describe');
grunt.file.write('public/version.json', JSON.stringify({
version: grunt.config('pkg.version'),
revision: grunt.config('meta.revision'),
date: grunt.template.today()
}));
});
@victorjspinto
victorjspinto / .gitmodules
Last active August 29, 2015 14:13
maven-java-web-parent
[submodule "java-parent"]
path = java-parent
url = git@gist.github.com:/bb301f403bbe939170a9.git
@victorjspinto
victorjspinto / pom.xml
Last active August 29, 2015 14:13
maven-java-parent
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>io.github.lordviktor</groupId>
<artifactId>java-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
@victorjspinto
victorjspinto / installer.sh
Last active April 11, 2017 18:03
Install all dev dependencies on Ubuntu 12.10
## adicionar deb http://security.ubuntu.com/ubuntu trusty-security main
# /etc/rc.local (Monta HD automático)
# mkdir -p /media/OS
# mount /dev/sda5 /media/OS &
# exit 0
sudo apt-get update
sudo apt-get -y upgrade