Skip to content

Instantly share code, notes, and snippets.

View javascripto's full-sized avatar
:octocat:
Focusing

Yuri Almeida javascripto

:octocat:
Focusing
  • São Paulo - SP
  • 00:37 (UTC -03:00)
View GitHub Profile
@javascripto
javascripto / podcast-scraping.py
Created March 5, 2018 02:38
Web Scraping hipsters.tech inspirado no podcast #82 - Programar sem enxergar
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
# Web Scraping com BeautifulSoup para baixar ultimos 5 podcasts do hipsters.tech
# Inspirado no podcast: Programar sem enxergar - Hipsters #82
# https://hipsters.tech/programar-sem-enxergar-hipsters-82/
import requests
from bs4 import BeautifulSoup
from time import time
@javascripto
javascripto / user.js
Created May 9, 2018 17:23 — forked from EtienneR/user.js
XMLHttpRequest RESTful (GET, POST, PUT, DELETE)
// Get all users
var url = "http://localhost:8080/api/v1/users";
var xhr = new XMLHttpRequest()
xhr.open('GET', url, true)
xhr.onload = function () {
var users = JSON.parse(xhr.responseText);
if (xhr.readyState == 4 && xhr.status == "200") {
console.table(users);
} else {
console.error(users);
@javascripto
javascripto / index.php
Created May 16, 2018 20:12
Servidor JSON Simples com PHP para testes
<?php
header('Content-type: application/json');
$method = $_SERVER['REQUEST_METHOD'];
$body = file_get_contents('php://input'); // request body
if (!file_exists('./db.json'))
file_put_contents('db.json', '{}');
$contents = file_get_contents('db.json');
$json = json_decode($contents, true); // true: stdClass => array associativo
@javascripto
javascripto / myProductKey.vbs
Last active June 15, 2018 15:41
Script para conseguir o product key do windows antes de formatar.
Set WshShell = CreateObject("WScript.Shell")
MsgBox ConvertToKey(WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId"))
Function ConvertToKey(Key)
Const KeyOffset = 52
i = 28
Chars = "BCDFGHJKMPQRTVWXY2346789"
Do
@javascripto
javascripto / scraping-bibliaonline.com.br.py
Created June 21, 2018 22:59
python scraper para conseguir todos versículos, capítulos e versões da bíblia contidas no site bibliaonline.com.br
#!/usr/bin/python3
# coding: utf-8
from os import system
from time import time
inicio = time()
system('clear')
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'gerador-senhas.ui'
#
# Created by: PyQt4 UI code generator 4.12.1
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
@javascripto
javascripto / laravel-rest.md
Last active August 9, 2018 12:13
Anotações Laravel REST API - (parcial)
// https://github.com/jasmine/jasmine/releases
const Calculadora = {
somar(valor1, valor2) {
return valor1 + valor2;
}
}
describe('Descrição da suite de testes', () => { // Suíte
it('Spec - Especificação dos testes - resultados esperados', () => { // Spec - Especificação