Skip to content

Instantly share code, notes, and snippets.

@bracca95
bracca95 / pyenv-conf.md
Last active October 10, 2024 12:05
A pipeline to configure pyenv (user level)

This guide takes for granted that pyenv has already been installed on your system. In this is not the case, ask an admin to refer to the pyenv guide. These instructions are meant to be copy-pasted: variables introduced by the symbol <> are those that might change from one system to another, so be carefull if you are moving to another platform or have different configurations.

Important!!

As a general guideline, we suppose that you are going to download only one python version but you might have more virtual environments. For these reason, all the commands, except the 5th point, must be run once. When you want to create a virtual enviroment, simply run the 5th point with a different virtualenv name.

1. Download pyenv

# copy paste
@bracca95
bracca95 / WindowsTroubleshooting.md
Last active July 9, 2024 12:33
Some troubleshooting techniques for background processes on Windows

Windows Troubleshooting

Using background processes on windows, especially if connected through ssh, might be painful. Here's a collection of (some of) the problems that I ran into while using Windows.

You can get the amount of available RAM (free equivalent command) by typing:

wmic ComputerSystem get TotalPhysicalMemory
@bracca95
bracca95 / vscode_launch.json.md
Last active April 23, 2024 15:22
vscode launch.json file for python projects

Create a new launch.json in your ${PROJ_DIR}.vscode to run the debugger. Thanks to https://stackoverflow.com/a/55072246

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: Current File",
            "type": "debugpy",
 "request": "launch",
@bracca95
bracca95 / Sublime-Text-3-python-dev.md
Last active May 7, 2021 16:07
Custom settings for Python development on Sublime Text 3

PyST3

Setting Sublime Text for Python development

This file describes the operations needed to properly configure a Python development environment in Sublime Text 3, in particular:

  • Package Anaconda for autocompletion
  • syntax-specific settings
  • virtual environment support

The main objective is to make Sublime Text always ready for Python scripting by setting a default interpreter location, but also have the chance to use virtual environments with specific packages.

@bracca95
bracca95 / delete-tweets.md
Last active February 6, 2023 13:39
delete-tweets.md

Ever wanted to delete all your tweets from Twitter but only found broken/expensive tools? You are in the right place.

  1. Go to: https://twitter.com/{username}/with_replies
  2. Open the console and run the following JavaScript code:
/* define a function to delete tweets */
var myName = "INSERT YOUR TWITTER NAME HERE"

function unTweet() {
@bracca95
bracca95 / delete-retweets-from-twitter.md
Last active March 12, 2023 06:39
delete-retweets-from-twitter.md

Ever wanted to delete all your retweets from Twitter but only found broken/expensive tools? You are in the right place.

  1. Go to: https://twitter.com/{username}/with_replies
  2. Open the console and run the following JavaScript code:
/* define a function to delete retweets */
function unRetweet() {
	for (const d of document.querySelectorAll('div[data-testid="unretweet"]')) {
 d.click();
@bracca95
bracca95 / delete-likes-from-twitter.md
Last active April 5, 2023 13:03 — forked from aymericbeaumet/delete-likes-from-twitter.md
[Recipe] Delete all your likes/favorites from Twitter

Ever wanted to delete all your likes/favorites from Twitter but only found broken/expensive tools? You are in the right place.

  1. Go to: https://twitter.com/{username}/likes
  2. Open the console and run the following JavaScript code:
/* define a function to delete likes */
function unLike() {
	for (const d of document.querySelectorAll('div[data-testid="unlike"]')) {
 d.click();