Skip to content

Instantly share code, notes, and snippets.

Jonatas Emidio jonatasemidio

View GitHub Profile
@jonatasemidio
jonatasemidio / ConnectionFactory.java
Created Sep 8, 2017
ConnectionFactory using sqlite driver
View ConnectionFactory.java
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
jonatasemidio / POLYMER_INFO.MD
Last active Jun 12, 2017
Polymer usefull info
View POLYMER_INFO.MD

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

OBS:

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

@jonatasemidio
jonatasemidio / README.md
Created Jun 8, 2017
Setting up a blank Cloud 9 workspace for Ruby and Sinatra Raw
View README.md

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
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">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<script
src="https://code.jquery.com/jquery-3.2.1.min.js"
integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4="
View buildDataLina.groovy
l=
["seguradora ",
"broker ",
"contrato ",
"tipoPlano ",
"referencia ",
"cob ",
"singleCob ",
"periodoContaInicial",
"periodoContaFinal ",
@jonatasemidio
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]
View rubik.md
  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
jonatasemidio / dilma_boolean_case.md
Last active May 12, 2016
Dilma Boolean Case #DBC
View dilma_boolean_case.md

Dilma Boolean Case

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

Salve Devs!!

Dilma

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
jonatasemidio / gma.md
Last active Jun 26, 2016
Groovy Multiple Assignment
View gma.md
@jonatasemidio
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": "jonatasemidio@gmail.com"}, "branch": "master"}' https://api.github.com/repos/jonatasemidio/blog/contents/index.html
Create a File
curl -i -X PUT -H 'Authorization: token <your token>' -d '{"path": "index.html", "message": "Initial Commit", "committer": {"name": "Jonatas Emidio", "email": "jonatasemidio@gmail.com"}, "content": "VGVzdGluZyBHaXRIdWIgQVBJ", "branch": "master"}' https://api.github.com/repos/jonatasemidio/blog/contents/index.html
Update a File
curl -i -X PUT -H 'Authorization: token <your token>' -d '{"path": "index.html", "message": "Initial Commit", "committer": {"name": "Jonatas Emidio", "email": "jonatasemidio@gmail.com"}, "content": "VGVzdGluZyBHaXRIdWIgQVBJ", "sha":"2706f84a7078ad64fbdca10558879e6f2c323694", "branch": "master"}' https://api.github.com/repos/jonatasemidio/blog/contents/index.html
Delete a File
You can’t perform that action at this time.