Skip to content

Instantly share code, notes, and snippets.

View naelstrof's full-sized avatar
🤡

naelstrof naelstrof

🤡
View GitHub Profile
@naelstrof
naelstrof / mtgCardScraper.sh
Created January 5, 2015 08:15
Takes a list of search terms as arguments, searches the Magic The Gathering database for an image related to each search term and downloads them.
#!/bin/bash
# Usage: ./mtgCardScraper.sh [search terms]
# Example: ./mtgCardScraper.sh "zombie" "angel"
# Searching for zombie..
# Grabbed Zombie Apocalypse.jpg
# Searching for angel..
# Grabbed Angel of Despair.jpg
# Please use responsibly.
@naelstrof
naelstrof / seen.sh
Last active December 9, 2016 14:38
Takes screenshots and videos of user selection, automatically uploads to a server mounted on your system, then copies the URL to your clipboard.Depends on xclip, ffmpeg, maim, mplayer, and slop.Use "seen.sh image" to capture an image, and use "seen.sh video" to start recording a video. Then use "seen.sh video" again to stop recording.I use maim …
#!/bin/bash
server="/mnt/charles/farmstore/content/${1}s"
url="http://farmpolice.com/content/${1}s"
imageEncoding=".png"
videoEncoding=".webm"
imagetake="/usr/share/sounds/freedesktop/stereo/screen-capture.oga"
videotake="/usr/share/sounds/freedesktop/stereo/complete.oga"
name=$(cat /dev/urandom | tr -cd 'a-f0-9' | head -c 8)
pidFile="/tmp/seen_record.pid"
#!/usr/bin/env ruby
# Sometimes, you realize you have really rubbish songs in your library for some reason.
# This script allows you to get rid of them just by hitting ./mpd-delete-current-song.rb on your command line.
# It will backup the file to TRASH, then remove it from MPD's library and finally skip to next song.
# https://gist.github.com/1341895
require 'socket'
require 'fileutils'