Skip to content

Instantly share code, notes, and snippets.

View mateusjunges's full-sized avatar
🌎
Trying to make the world a better place

Mateus Junges mateusjunges

🌎
Trying to make the world a better place
View GitHub Profile
from pytube import YouTube
import os
def Download(link, output):
print("Downloading...\n\n")
youtubeObject = YouTube(link)
video = youtubeObject.streams.get_highest_resolution()
try:
<?php
class Solution
{
protected Converter $converter;
public function __construct(
protected string $hexColorOne,
protected string $hexColorTwo
){
@mateusjunges
mateusjunges / decode-polyline.php
Last active November 9, 2020 18:34
Function to decode a polyline using php
/**
* Decodes path string into a sequence of LatLngs.
*
* @param string $encoded_path
* @param int $precision
* @return array
*/
public static function decode(string $encoded_path, int $precision = 6)
{
$len = strlen( $encoded_path ) -1;
@mateusjunges
mateusjunges / decode-poyline.js
Last active August 25, 2020 19:51
Decode a polyline from Valhalla
// mul = 1e6 ou 1e5
function decode(encoded, mul) {
//precision
var inv = 1.0 / mul;
var decoded = [];
var previous = [0,0];
var i = 0;
//for each byte
while(i < encoded.length) {
Geral
git help
Comando específico
git help add
git help commit
git help <qualquer comando git>

Configuração