Skip to content

Instantly share code, notes, and snippets.

motine / cleanup_job.rb
Last active April 22, 2021 16:45
Simple Rails Monitoring
# 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 March 28, 2024 20:52
👑 Awesome one-liners you might find useful while coding.
// 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 February 15, 2023 21:30
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 April 25, 2012 20:56
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)