Skip to content

Instantly share code, notes, and snippets.

View roddds's full-sized avatar

Rodrigo Deodoro roddds

View GitHub Profile

Cursor Movement

Key Combination Description
Ctrl + A Move to the beginning of the line
Ctrl + E Move to the end of the line
Ctrl + B Move one character backward
Ctrl + F Move one character forward
Alt + B Move one word backward
Alt + F Move one word forward
@roddds
roddds / download_slack_history.py
Created December 27, 2022 20:04
Download a Slack channel's full history, including thread replies
"""
$ export SLACK_TOKEN="xoxb-1234567890-1234567890123-GaT2364GEv72wRpDfSkqn2Wk"
$ python download_slack_history.py CHANNELID
Downloading messages...
...............................................................done!
Downloading threads
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
@roddds
roddds / speedcontrols.user.js
Last active October 6, 2020 16:56
Add speed controls to SAP Litmos
// ==UserScript==
// @name Litmos speed controls
// @namespace rodrigo.deodoro@carta.com
// @version 0.2
// @description Add speed controls to SAP Litmos videos
// @author Rodrigo Deodoro
// @match https://*.litmos.com/course/*
// ==/UserScript==
(function () {
@roddds
roddds / remove_empty_dirs.py
Last active September 20, 2021 12:36
Recursively delete all empty directories
import os
for dirpath, dirnames, files in os.walk('.'):
if not (files or dirnames):
os.rmdir(dirpath)
import subprocess
import asyncio
import os
import re
from collections import namedtuple
from bs4 import BeautifulSoup
import requests
'''
import time
import sys
import sched
from pync import Notifier
def main():
seconds = int(sys.argv[1]) * 60
text = sys.argv[2]
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@roddds
roddds / gist:a1f42bae598028ac7809
Last active December 8, 2020 22:46 — forked from raddevon/gist:67935d320ee9b726d19d
Adobe tries to strong-arm me into keeping Creative Cloud

To everyone who got here through Twitter or Facebook or Hacker News or whatever: THIS IS NOT ME.

The "Me" in this transcript is @raddevon, who shared his story first on reddit.


List of incompetent jackasses who can't check a source if their lives depended on it:

[run]
branch = True
omit = *migrations*,
*urls*,
*test*,
*admin*,
*scripts*,
*models*,
pipes/config/*,
pipes/manage.py,
@roddds
roddds / admin.py
Created July 27, 2015 00:12
Showing foreign key attributes on Django Admin
from django.contrib import admin
from django.core.urlresolvers import reverse
from .models import Carro, Fabrica, Pais
class CarroAdmin(admin.ModelAdmin):
list_display = ('nome', 'fabrica', 'pais')
def queryset(self):
qs = super(CarroAdmin, self).queryset()