Skip to content

Instantly share code, notes, and snippets.

View guilhermesimoes's full-sized avatar
😎

Guilherme Simoes guilhermesimoes

😎
View GitHub Profile
@guilhermesimoes
guilhermesimoes / 2serv.py
Created March 8, 2023 17:20 — forked from phrawzty/2serv.py
simple python http server to dump request headers
#!/usr/bin/env python2
import SimpleHTTPServer
import SocketServer
import logging
PORT = 8000
class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
@guilhermesimoes
guilhermesimoes / download.sh
Created June 7, 2020 22:26 — forked from jmurphyau/download.sh
Download HLS Stream with FFmpeg
#this
ffmpeg -loglevel debug -f hls -referer 'https://10play.com.au/live' -user_agent 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/82.0.4050.0 Safari/537.36' -f hls -i "https://manifest.prod.boltdns.net/manifest/v1/hls/v4/aes128/2199827728001/6bd7fe89-1f2f-42d0-b7a5-c676791a0d83/10s/master.m3u8?fastly_token=NWUzZDliOGZfNTJhZjJhN2IxMzQ5OTdjNGVkYmEzODkwNjYwZTYyMWY2ZmY1YjNmNGJkNWM3NjdiNDFiZmViNjczNzMwMmJlYQ%3D%3D" -c copy project5.mp4
# or this
ffmpeg -loglevel debug -f hls -referer 'https://10play.com.au/live' -user_agent 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/82.0.4050.0 Safari/537.36' -f hls -i "https://manifest.prod.boltdns.net/manifest/v1/hls/v4/aes128/2199827728001/6bd7fe89-1f2f-42d0-b7a5-c676791a0d83/10s/master.m3u8?fastly_token=NWUzZDliOGZfNTJhZjJhN2IxMzQ5OTdjNGVkYmEzODkwNjYwZTYyMWY2ZmY1YjNmNGJkNWM3NjdiNDFiZmViNjczNzMwMmJlYQ%3D%3D" -c copy -bsf:a aac_adtstoasc project3.mp4
@guilhermesimoes
guilhermesimoes / README.md
Last active April 12, 2020 16:22
Animated NBC Peacock Logo

My attempt at animating NBC's peacock showing-off.

If you're interested in NBC's past, check out the history of NBC's logo and chime.

@guilhermesimoes
guilhermesimoes / .block
Last active November 12, 2017 22:06 — forked from HarryStevens/.block
Box and Whisker
license: gpl-3.0
@guilhermesimoes
guilhermesimoes / .block
Last active August 14, 2017 14:51
D3 V4 join & enter
license: gpl-3.0
@guilhermesimoes
guilhermesimoes / .block
Last active April 19, 2017 15:58 — forked from mbostock/.block
D3 V3 join & enter
license: gpl-3.0
@guilhermesimoes
guilhermesimoes / loop_starting_at_index_one_benchmark.rb
Created April 7, 2017 14:29
Ruby Benchmark: Starting a loop at index 1
# gem install benchmark-ips
require "benchmark/ips"
Benchmark.ips do |x|
x.report("range") { (1..100).each { |i| i } }
x.report("upto") { 1.upto(100).each { |i| i } }
x.report("times plus one") { 100.times { |i| i + 1 } }
@guilhermesimoes
guilhermesimoes / .block
Last active February 8, 2017 00:52
D3.js: Animating a pie chart
license: gpl-3.0
@guilhermesimoes
guilhermesimoes / last_uri_path_benchmark.rb
Last active November 30, 2016 00:28
Ruby Benchmark: Determining the last part of a URI
# gem install benchmark-ips
require "benchmark/ips"
uri = "http://twitter.com/user/statuses/1234567891011121314"
Benchmark.ips do |x|
x.report("file.basename") { File.basename(uri) }
x.report("split('/').last") { uri.split("/").last }
@guilhermesimoes
guilhermesimoes / .block
Last active April 6, 2020 01:01
D3.js: Encoding values as circles
license: gpl-3.0