Skip to content

Instantly share code, notes, and snippets.

@benoit-cty
benoit-cty / slack_backup.py
Last active August 25, 2023 16:32
Script to archive Slack messages from a channel list.
'''
Script to archive Slack messages from a channel list.
You have to create a Slack Bot and invite him to private channels.
View https://github.com/docmarionum1/slack-archive-bot for how to configure your account.
Then provide the bot token to this script with the list of channels.
'''
TOKEN='xoxb-xxxxx-xxxxxx-xxxxxxxxxxx'
channels = {
@ShannonScott
ShannonScott / Video Screen Capture with GStreamer.md
Created October 30, 2019 16:28
[Video Screen Capture with GStreamer] Capture a Linux desktop window video with gsteramer. #tags: gstreamer, linux, xwindows, video

Capture a video of a given X Window with gstreamer.

X Window ID

Get the target window ID with the following:

xwininfo
@jackdpeterson
jackdpeterson / dock.sh
Created April 4, 2018 18:05
Ubuntu 18.04 - Mixed DPI with 4k Laptop monitor (HiDPI), and two LoDPI monitors (27", 21")
#!/bin/bash
echo "setting frame buffer" &&
xrandr --fb 12800x2880 &&
echo "setting laptop monitor" &&
xrandr --output eDP-1-1 --mode 3840x2160 --rate 60 --primary&&
echo "setting 27 inch monitor" &&
xrandr --output DP-0.2 --mode 2560x1440 --scale-from 5120x2880 --panning 5120x2880+3840+0 --right-of eDP-1-1 &&
echo "setting the samsung monitor" &&
xrandr --output DP-0.1 --mode 1920x1080 --scale-from 3840x2160 --panning 3840x2160+8960+0 --right-of DP-0.2&&
echo "setting global scaling to 2x" &&