Skip to content

Instantly share code, notes, and snippets.


Luke Bacon equivalentideas

View GitHub Profile
equivalentideas / share-links-jekyll
Last active October 14, 2018 21:57
Social media share links for Jekyll/Liquid. Add these into a Jekyll layout to produce social media share links using that page's url and description.
View share-links-jekyll
equivalentideas /
Created February 7, 2018 08:32
Outline for Working with spreadsheets, Free Class at Frontyard Projects

2018-02-05 Working with spreadsheets, Free Class at Frontyard Projects

Session Outline

  • What is data?
    • Things and their attributes
    • How do spreadsheets present data? Rows and columns, things and attributes
    • Example, plants? Coconut tree, fig tree, parsley, strawberry, silver beat
    • Why use a spreadsheet to work with this data? Graphic and usable way to build and organise data
  • Quick and powerful analysis tool
equivalentideas / slack_reactions_from_export.rb
Created November 7, 2017 00:04
Extract a list of all the reactions to messages from a Slack data export
View slack_reactions_from_export.rb
# Put this script in the root directory of a Slack data export
# Run `bundle install` and then `bundle exec ruby slack_reactions_from_export.rb`
# This will create a file called `reactions.txt` with rows like this:
# 2017-04-09 9:56 in #general: 😀
# 2017-04-10 9:45 in #tech-discussions: ⚽️
# 2017-04-19 15:45 in #general: 💖
# 2017-04-20 11:59 in #general: :hugging_face:
# 2017-04-20 22:35 in #general: 🤕
# 2017-04-30 21:38 in #most17: ❤️❤️
equivalentideas / Rebooting production Linode
Last active October 2, 2017 10:28
Runsheet for rebooting the current production server
View Rebooting production Linode

Rebooting the production server

  1. Log into Linode and go to the page for
  2. Go to the Remote Access tab and to Console Access at the bottom of that page
  3. There’s a command there called ‘Lish via SSH’
  4. Copy that to your local shell and run it. You should now see the output of the machine, processes running, dying etc.
  5. In another shell session ssh to
  6. Try the light touch first, run reboot there
    • If you switch to the lish session, you will see processes start shutting down in the linode console access session
  • after a minute that may become stuck on a command
equivalentideas /
Last active August 23, 2017 02:13
Introduction to Web Scraping Workshop
equivalentideas / extract_hidden_requests_from_right_to_know.rb
Last active August 17, 2017 06:38
Script to run using rails runner to extract information about hidden information requests from Right To Know for analysis. It makes a .csv file with the days date in the title, containing some select (and not safe to publish) information on every hidden request.
View extract_hidden_requests_from_right_to_know.rb"./tmp/#{}_hidden_requests.csv", "wb") do |csv|
# Make headers
csv << [
equivalentideas /
Created June 7, 2017 11:57
Bash script for dividing emails.txt into separate .csv files for each 2000 email addresses
line_count=$(cat emails.txt | wc -l)
while [ $file_count -lt $line_count ]
echo "creating file emails_$file_count.csv"
tail -n+$file_count emails.txt | head -n2000 >> emails_$file_count.csv
equivalentideas / command.rb
Created May 24, 2017 01:03
Command to create markdown file of visible comments on a planning application in PlanningAlerts
View command.rb
# Run these commands on the production Rails console
# This creates a markdown file with the comments in the format:
# From: Luke Bacon
# Date of Submission: 6 April 2017
# Comment text bla bla bla
# * * *
equivalentideas / convert_mp3_to_aiff_using_ffmpeg
Created April 14, 2017 07:56
shell command to create new AIFF conversions for all MP3 files in the current directory
View convert_mp3_to_aiff_using_ffmpeg
find . -name '*.mp3' | sed s/.mp3// | sed 's/.*/&.mp3 &.aiff/' | xargs -n 2 ffmpeg -i
equivalentideas /
Created February 2, 2017 05:28

Keybase proof

I hereby claim:

  • I am equivalentideas on github.
  • I am equivalentideas ( on keybase.
  • I have a public key ASCRtEsTIc-fZIAknASnMfiXEtN623R8LzctenDt90zoTQo

To claim this, I am signing this object: