Skip to content

Instantly share code, notes, and snippets.

View pablocattaneo's full-sized avatar

Pablo Cattaneo pablocattaneo

View GitHub Profile
# Source: https://www.youtube.com/watch?v=vEdDGa9mKsY
sudo apt update # update list of available packages
sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libreadline-dev libssl-dev libffi-dev libsqlite3-dev wget libbz2-dev # install required dependencies to compile Python
wget https://www.python.org/ftp/python/3.9.14/Python-3.9.14.tgz # Download python version
sudo tar -xf Python-3.9.14.tgz #decompress file
cd Python-3.9.14
sudo ./configure --enable-optimizations #Enable optimizations
sudo make altinstall #Build and install Python
docker stop $(docker ps -a -q)
// React.ChangeEvent<HTMLInputElement>
// Source https://stackoverflow.com/a/49820103/3599272
handleChange(e: React.ChangeEvent<HTMLInputElement>) {
// No longer need to cast to any - hooray for react!
this.setState({temperature: e.target.value});
}
// Source: https://stackoverflow.com/a/45092365/3599272
onClick={(event: React.MouseEvent<HTMLElement>) => {
# git show {hash}
git show a2c25061
# Source: https://stackoverflow.com/a/14167343/3599272
git branch my-branch-name
git checkout -b my-branch-name # create the branch and make chekcout on it
yarn list --pattern <package_name>
## Source: https://stackoverflow.com/a/66796198/3599272
git show <COMMIT>
# Source: https://stackoverflow.com/a/37830793/3599272
For example:
expect(wrapper.find('.invalid-feedback.d-block').exists()).toBe(true)