Skip to content

Instantly share code, notes, and snippets.

motine / cleanup_job.rb
Last active Apr 22, 2021
Simple Rails Monitoring
View cleanup_job.rb
# services/monitoring/cleanup_service.rb
class Monitoring::CleanupService
Monitoring::Measurement.where("recorded_at < ?", 3.months.ago).delete_all
# let this service run nightly
mikowl / oneliners.js
Last active Oct 2, 2022
👑 Awesome one-liners you might find useful while coding.
View oneliners.js
// Inspired by and
// Remove any duplicates from an array of primitives.
const unique = [ Set(arr)]
// Sleep in async functions. Use: await sleep(2000).
const sleep = (ms) => (new Promise(resolve => setTimeout(resolve, ms)));
// or
const sleep = util.promisify(setTimeout);
david-crespo /
Last active Sep 11, 2022
Download FB tagged photos and videos

Download photos and videos you're tagged in on Facebook


When you download an archive of your Facebook account, Facebook includes photos and videos you've uploaded, but not photos and videos you're tagged in that were uploaded by other people. This is a script to automatically download those.


This requires Python 3.

JennDudley /
Created Apr 25, 2012
Steps to set up a new Rails app, initialize a git repo, push to Github and deploy to Heroku

This is a list of steps to:

  • Setup a new Rails app
  • Initialize a local repository using git
  • Create a new remote repository using GitHub
  • Change README.rdoc
  • Deploy to a cloud service - Heroku


  • Ruby is installed (v 1.9.3)
  • Rails is installed (v 3.2.3)