Skip to content

Instantly share code, notes, and snippets.

@StevenBlack
Last active December 10, 2015 16:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save StevenBlack/4459239 to your computer and use it in GitHub Desktop.
Save StevenBlack/4459239 to your computer and use it in GitHub Desktop.
Bash script for the #YGK twitter hashtag. Uses the 't' command line client (a Ruby gem). This script uses Gist #4297661 to filter #ygk hashtag spam. https://gist.github.com/4297661
#!/bin/bash
# First install 't', the Twitter command line client: https://github.com/sferik/t#readme
# This is a Ruby gem and if you are on Mac OS X or any flavour of *nix you're probably got Ruby.
# Next ensure you have 'curl' installed (on Mac OS X you probably do)
# Given these two prerequisites then...
# Step 1: Grab the latest #ygk fluff filter from Gist #4297661 in raw form
EXCL="`curl https://gist.github.com/raw/4297661`"
# Default to 50 tweets but you can pass-in some other number
Q=${1:-50}
# Step 2: Fetch the last 100 #ygk tweets, cleansed of fluff
t search all "$EXCL" -l -n ${Q}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment