- 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)
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.
// Inspired by https://twitter.com/coderitual/status/1112297299307384833 and https://tapajyoti-bose.medium.com/7-killer-one-liners-in-javascript-33db6798f5bf | |
// Remove any duplicates from an array of primitives. | |
const unique = [...new 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); |
# services/monitoring/cleanup_service.rb | |
class Monitoring::CleanupService | |
def self.run | |
Monitoring::Measurement.where("recorded_at < ?", 3.months.ago).delete_all | |
end | |
end | |
# let this service run nightly |