Skip to content

Instantly share code, notes, and snippets.

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

Thiago thiagosantos

🏠
Working from home
View GitHub Profile
@thiagosantos
thiagosantos / puppeteer.ubuntu20.md
Last active July 15, 2021 14:47
puppeteer dependecies

puppeteer dependencies for Ubuntu 20.04

error while loading shared libraries: LIB_X cannot open shared object file: No such file or directory

sudo apt-get install libxss1
sudo apt-get install libasound2
sudo apt-get install libatk-bridge2.0-0
sudo apt install libgtk-3-0
sudo apt install libgbm-dev
@thiagosantos
thiagosantos / drop_default_constraint.sql
Created August 20, 2021 15:29
Drop default constraint without knowing its name - SQL SERVER
/**
Answer from Philip Kelley at https://stackoverflow.com/a/1433384/4537233
**/
declare @schema_name nvarchar(256)
declare @table_name nvarchar(256)
declare @col_name nvarchar(256)
declare @Command nvarchar(1000)
set @schema_name = N'MySchema'
@thiagosantos
thiagosantos / sum_feed_duration.py
Created April 11, 2022 23:55
Sum podcast feed duration
"""
Extract duration from episodes suming it, convert it to hours, seconds, max duration episode and min duration.
- Install xmltodict
python3 -m pip install xmltodict
Change feed_url to your own feed url.
This Python file could be converted to a script passing args when calling it.
"""
import urllib
import xmltodict