Skip to content

Instantly share code, notes, and snippets.

View JoaoGFarias's full-sized avatar
🏠
Working from home

João Farias JoaoGFarias

🏠
Working from home
View GitHub Profile
0xE5162B3018Ad172804dF6cEF299cF158eF82f61A
@JoaoGFarias
JoaoGFarias / postman_workshop_CESAR_2017.json
Created July 21, 2017 18:34
Postman Workshop - CESAR 2017
{
"variables": [],
"info": {
"name": "Postman Workshop",
"_postman_id": "340162d5-d5cb-adf5-5920-405c041a2280",
"description": "",
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
},
"item": [
{
@JoaoGFarias
JoaoGFarias / select_works.py
Created July 16, 2017 18:48
ScriptLattes Analysis
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
import csv
import re
import string
import yaml
def save_new_authors(authors, file_title='new_authors_list.txt'):
authors.sort()
with open(file_title, mode='w+') as file_handler:
@JoaoGFarias
JoaoGFarias / crawler.py
Last active July 29, 2017 20:46
Filmow comments crawler
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
import csv
import json
# Execution:
# Run: pip install selenium
# Fill in the following 4 variables with the necessary data
@JoaoGFarias
JoaoGFarias / Client.rb
Last active December 18, 2015 21:00
Example of Test-Driven testing in Ruby
admin1 = User.getUserInfo("admin1")
puts admin1["email"] # -> Prints admin1@email.com
user1 = User.getUserInfo("user_1")
puts user1["email"] # -> Prints user1@email.com
wrongPasswordForUser1 = user1["password"] + "Sufix to break password"
@JoaoGFarias
JoaoGFarias / openRedu_mac-os_run.sh
Last active December 5, 2015 18:32
Shell script for setting up a OSX envirioment to development of OpenRedu
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
@JoaoGFarias
JoaoGFarias / data.csv
Created August 1, 2015 16:28
Projetando as contas parceladas
Loja 1 07/06 24.99
@JoaoGFarias
JoaoGFarias / collectionFilterJava8.java
Last active August 29, 2015 14:13
Collection filter using Java 8
ArrayList<String> owners = new ArrayList<String>();
ArrayList<String> owner1Teams = new ArrayList<String>();
//Creating the unfilter collection
owners.add("Owner 1 - Team 1");
owners.add("Owner 1 - Team 2");
owners.add("Owner 2 - Team 1");
owners.add("Owner 2 - Team 2");
@JoaoGFarias
JoaoGFarias / persistentTreePHP.php
Created January 5, 2015 18:55
A persistent binary search tree in PHP
<?php
abstract class Node{
abstract public function __construct($left,$val,$right);
abstract public function isEmpty();
abstract public function insert($val);
abstract public function member($val);
}
@JoaoGFarias
JoaoGFarias / gist:73380ef76bd153540ea7
Created September 8, 2014 12:55
Selenium - Parallel Data-Driven testing using TestNG
/*This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.