Para trabalhar com git no windows faça o download do git bash e do emulador de console cmder.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# coding: utf-8 | |
from os import system | |
from time import time | |
inicio = time() | |
system('clear') | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const images = ['image1.jpg', 'image2.jpg', 'image3.jpg']; | |
((arr, fn, ms) => { | |
let count = -1; | |
setInterval(() => fn(arr[++count % arr.length]), ms); | |
})(images, console.log, 1000); | |
((arr, fn, ms) => | |
setInterval(() => arr.push(arr.shift()) && fn(arr[0]), ms) |
OlderNewer