Skip to content

Instantly share code, notes, and snippets.

View ankushnarula's full-sized avatar

kush ankushnarula

View GitHub Profile
@ankushnarula
ankushnarula / email to calendar
Created September 29, 2021 01:44 — forked from bchartoff/email to calendar
An AppleScript to automatically create a calendar event from an e-mail containing a date and time of the form "March 10, 2015 12:00 - 2:00 PM". Distributed under MIT license (see below)
(*
Create Calendar event from Message
*)
set theContent to string
-- A subroutine to strip all tags from html
on remove_markup(this_text)
set copy_flag to true
set the clean_text to ""
repeat with this_char in this_text
@ankushnarula
ankushnarula / command.txt
Created September 6, 2016 20:31 — forked from nrk/command.txt
Using ffprobe to get info from a file in a nice JSON format
ffprobe -v quiet -print_format json -show_format -show_streams "lolwut.mp4" > "lolwut.mp4.json"
#!/bin/bash
# A simple script to backup an organization's GitHub repositories.
GHBU_BACKUP_DIR=${GHBU_BACKUP_DIR-"github-backups"} # where to place the backup files
GHBU_ORG=${GHBU_ORG-"<CHANGE-ME>"} # the GitHub organization whose repos will be backed up
# (if you're backing up a user's repos instead, this should be your GitHub username)
GHBU_UNAME=${GHBU_UNAME-"<CHANGE-ME>"} # the username of a GitHub account (to use with the GitHub API)
GHBU_PASSWD=${GHBU_PASSWD-"<CHANGE-ME>"} # the password for that account
GHBU_GITHOST=${GHBU_GITHOST-"github.com"} # the GitHub hostname (see comments)
GHBU_PRUNE_OLD=${GHBU_PRUNE_OLD-true} # when `true`, old backups will be deleted