Justin Gallardo

Easy Screenshots in Linux

1 minute read Published:

Here is a small script to make it easy to take screenshots and send them to my webserver for sharing.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash

# Create a temporary file to store the screenshot in
tmpfile=$(mktemp /tmp/XXXXXXX.png)

# Take the screenshot
scrot -s "$tmpfile" > /dev/null

# Copy the file to the server
scp "$tmpfile" webserver:/var/www/screenshots.example.com > /dev/null

# Generate the url for the screenshot
url=https://screenshots.example.com/$(basename "$tmpfile")

# Output url, open the url in the browser, and copy url to clipboard
echo "$url" | xclip
xdg-open "$url" &> /dev/null
echo "$url"

# Remove the screenshot
rm "$tmpfile"

the great slack migration

3 minute read Published:

After 7 years of using IRC to keep in touch, a group of friends and I made the leap to use Slack instead of IRC. At first there was some resistance with a couple of false starts, but eventually consensus was achieved and the migration was made. One of the immediate benefits of moving to Slack was the barrier to entry was lowered dramatically. By using IRC we limited the audience of our channel to the more techincal people in our friend group.