Skip to content

Instantly share code, notes, and snippets.

@febuiles
febuiles / hubot.sh
Created November 25, 2011 22:02
Hubot startup script
#!/bin/sh
# This assumes you have:
# 1) A user called `hubot` in charge of the bot.
# 2) A file called /home/hubot/.hubotrc that contains the Hubot credentials.
#
# To set the adapter either edit bin/hubot to specify what you want or append
# `-- -a campfire` to the $DAEMON variable below.
#
### BEGIN INIT INFO
@febuiles
febuiles / god.rb
Created November 25, 2011 22:46
God config for Hubot
# start the service with `god -c /etc/god/god.conf`. Use `rvmsudo` if you
# manage your rubies with RVM.
# You can see the start/stop script for Hubot at: https://gist.github.com/1394520
God.watch do |w|
w.name = "hubot"
w.start = "/etc/init.d/hubot start"
w.stop = "/etc/init.d/hubot stop"
w.restart = "/etc/init.d/hubot restart"
@febuiles
febuiles / songs.md
Last active July 1, 2022 03:45
Fetching lyrics in Unix

Fetching lyrics in the command line

Objective: Print the lyrics for the current playing song.

How: We'll create a small bash script to do the fetching for us (using curl) and then we'll display it either in the terminal or in our $EDITOR

Get the current song

First we'll need to get the name of the current song and its artist: