Skip to content

Instantly share code, notes, and snippets.

View linjer's full-sized avatar

Jerry Lin linjer

View GitHub Profile
linjer /
Last active April 1, 2024 07:15
Script to automatically remote old Mac OSX Time Machine Backups older than a specified number of days


  • gfind (via brew install findutils)
  • Time Machine drive mounted on your computer (or you can change path from standard /Volume/Time\ Machine\ Backups/Backups.backup.db/
  • Admin/sudo access in the OSX terminal


  • Be sure to set the correct machine name. You can check the actual folder things are going into by looking in the backup location.
  • By default, it erases all backups older than 30 days. Adjust as desired.
linjer /
Last active April 20, 2019 06:40
Atlassian Stash 3.2 Git integration with Slack through external web hooks
# $1 => Slack hook URL
# $2 => Channel name
# $3 => URL to web repo browser for base project
# Debugging output in /tmp/stash_slack.txt
linjer / seed_mongodb_from_production.js
Last active August 29, 2015 14:23
Script for seeding local development mongodb instance from data on a production server
// Copies data from every mongo collection in production to your local instance
// Usage:
// 1. Configure the desired parameters below
// 2. $ mongo local-mongo-seed-all-collections.js
* Configuration parameters
var config = {