Skip to content

Instantly share code, notes, and snippets.

Jonatas Emidio jonatasemidio

Block or report user

Report or block jonatasemidio

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jonatasemidio /
Created Sep 8, 2017
ConnectionFactory using sqlite driver
package com.tecgraf.plugins.server.dao.conf;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
public class ConnectionFactory {
public static Connection getConnection() {
try {
jonatasemidio / POLYMER_INFO.MD
Last active Jun 12, 2017
Polymer usefull info

Try polimer in the Cloud9 IDE

Here OBS: Ypou can follow this steps but probably you will need to upgrade the node version

  • update node on cloud9 (easyest way): nvm install stable


Some times, in cloud9 you need to upgrade your node version and for this use the info above

jonatasemidio /
Created Jun 8, 2017
Setting up a blank Cloud 9 workspace for Ruby and Sinatra Raw

Basic Sinatra Workshop Setup

Cloud 9 workspace for Ruby and Sinatra

  • Sign up for Cloud9

  • Create a BLANK workspace (Not Ruby and Not Rails)

  • Name the workspace hello-sinatra

jonatasemidio / get_github_files.html
Created May 12, 2017
get file from github via ajax and github api [não está pronto]
View get_github_files.html
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
View buildDataLina.groovy
["seguradora ",
"broker ",
"contrato ",
"tipoPlano ",
"referencia ",
"cob ",
"singleCob ",
"periodoContaFinal ",
jonatasemidio / checkIdeas.groovy
Last active Jun 27, 2016
Palindrome Algorithms Ideas
View checkIdeas.groovy
n = "99"
s = n.length()
println s%2==0 ? "${n[0..(s/2-1)]} ${n[s/2..-1]}" : "${n[0..(s/2-1)]} ${n[s.intdiv(2)]} ${n[s/2+1..-1]}"
println s%2==0 ? "${n[0..(s/2-1)] == n[s/2..-1]}" : "${n[0..(s/2-1)] == n[s/2+1..-1]}"
println s%2==0 ? n[0..(s/2-1)] == n[s/2..-1] : n[0..(s/2-1)] == n[s/2+1..-1]
  1. cruz branca centro amarelo
  2. alinhe e, cada linha da cruz 2 de cada cor e inverta as faces de duas cores
  3. monte a face branca na base:
    • branca na esquerda = L’ U’ L
    • branca na direita = R U R’
    • branca no topo = R U2 R’ U’ R U R’
    • branca na base = R U R’
  4. alinhar a segunda camada:
    • meio direita = U R U’ R’ U’ F’ U F
    • meio esquerda = U’ L’ U L U F U’ F’
jonatasemidio /
Last active May 12, 2016
Dilma Boolean Case #DBC

Dilma Boolean Case

Então... Nossa president(a) sai ou não sai.

Salve Devs!!


Dado nossa situação atual de indecisão sobre o caso da nossa president(a) Dilma! Decidi trazer essa pergunta em forma de um problema de lógica para o nosso contexto de exatas.

jonatasemidio /
Last active Jun 26, 2016
Groovy Multiple Assignment
jonatasemidio / github_api_samples.txt
Last active Apr 20, 2016
GitHub API Samples Script cURL
View github_api_samples.txt
Get a File
curl -i -X GET -H 'Authorization: token <your token>' -d '{"path": "index.html", "message": "Initial Commit", "committer": {"name": "Jonatas Emidio", "email": ""}, "branch": "master"}'
Create a File
curl -i -X PUT -H 'Authorization: token <your token>' -d '{"path": "index.html", "message": "Initial Commit", "committer": {"name": "Jonatas Emidio", "email": ""}, "content": "VGVzdGluZyBHaXRIdWIgQVBJ", "branch": "master"}'
Update a File
curl -i -X PUT -H 'Authorization: token <your token>' -d '{"path": "index.html", "message": "Initial Commit", "committer": {"name": "Jonatas Emidio", "email": ""}, "content": "VGVzdGluZyBHaXRIdWIgQVBJ", "sha":"2706f84a7078ad64fbdca10558879e6f2c323694", "branch": "master"}'
Delete a File
You can’t perform that action at this time.