Skip to content

Instantly share code, notes, and snippets.

nrollr /
Last active Oct 3, 2015
Change the file location of screencaptures on OS X
defaults write location ~/Screenshots
killall SystemUIServer
nrollr / BackupThunderbird.applescript
Last active Dec 24, 2015
Applescript to backup Thunderbird directory as .zip File
View BackupThunderbird.applescript
-- Copy Thunderbird directory to /Users/{username}/Temp/
set mailFolder to ((path to home folder) as text) & "Library:Thunderbird" as alias
set tempFolder to ((path to home folder) as text) & "Temp" as alias
tell application "Finder"
duplicate folder mailFolder to folder tempFolder with replacing
end tell
-- Compress the Thunderbird copy
set destinationFolder to ((path to home folder) as text) & "Temp" as alias
set sourceFolder to ((path to home folder) as text) & "Temp:Thunderbird" as alias
nrollr / SafariToReminders.applescript
Created Jan 16, 2016
Save open Safari tabs to
View SafariToReminders.applescript
set currentTab to 0
set the dateStamp to ((the current date) as string)
set listName to "Open Safari Tabs, dated: " & the dateStamp
tell application "Safari"
set safariWindow to the front window
set successCount to 0
set tabCount to (count of (tabs of safariWindow))
nrollr / font-face.css
Created Feb 28, 2016
Code to include custom Fonts in CSS
View font-face.css
@font-face {
font-family: 'name_font';
src:url('fonts/name_font.eot?#iefix') format('embedded-opentype'),
url('fonts/name_font.woff') format('woff'),
url('fonts/name_font.ttf') format('truetype'),
url('fonts/name_font.svg#bpicons') format('svg');
font-weight: normal;
font-style: normal;
nrollr / ElCapitan.applescript
Last active Jul 25, 2016
Performance improvements for El Capitan
View ElCapitan.applescript
-- Disable Time Machine Local Backups
sudo tmutil disablelocal
-- Disable Automatic Spell Checker
defaults write -g NSAutomaticSpellingCorrectionEnabled -bool false
-- Disable animations when opening and closing windows.
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false
-- Disable animations when opening a Quick Look window.
defaults write -g QLPanelAnimationDuration -float 0
-- Accelerated playback when adjusting the window size (Cocoa applications).
defaults write NSGlobalDomain NSWindowResizeTime -float 0.001
nrollr / Twilio_notification.php
Last active Feb 4, 2018
SMS notification using the Twilio API
View Twilio_notification.php
// Get the PHP helper library from
require_once 'twilio/autoload.php'; // Loads the library
use Twilio\Rest\Client;
// Your account details via
$sid = "xxxxxxxxxxxxxxxxxx"; //Account Sid
$token = "xxxxxxxxxxxxxxxxxx"; //Auth Token
$client = new Client($sid, $token);
nrollr /
Last active Mar 28, 2018
Ruby and Rails on El Capitan

#Install Ruby and Rails on El Capitan The following procedure was used to install the required components on El Capitan (clean install)

First make sure Xcode Command Line Tools are installed.
Open Terminal and enter: xcode-select --install you will be prompted to start the installation. Once finished proceed..

##Install Homebrew Important Notice: Homebrew and El Capitan, make sure to read the article!

  • Enter the following command: ruby -e "$(curl -fsSL"
nrollr /
Last active Nov 10, 2018
Retrieve file location of all items in the iTunes Library
# Extract file location of each item from iTunes Music Library.xml (renamed to iTunes.xml)
sed -n 's/.*<key>Location<\/key><string>\([^<]*\)<\/string>.*/\1/p' iTunes.xml > FileLocation.txt
nrollr /
Last active Oct 2, 2019
Generate SSH keys
ls -al ~/.ssh # Lists existing files in your .ssh directory
ssh-keygen -t rsa -b 4096 -C "" # Creates new ssh key, using the provided email as label
eval "$(ssh-agent -s)" # Ensure ssh-agent is enabled
ssh-add ~/.ssh/id_rsa # Add ssh key to the ssh-agent
nrollr / HTTPCheckStatus.applescript
Created Nov 29, 2015
Script to validate list or URL's based on the HTTP status code
View HTTPCheckStatus.applescript
-- Replace 'username' in the path with your own (lines 2 & 3)
set inputFile to "/Users/username/Documents/ListURL.txt"
set outputFile to "/Users/username/Documents/StatusURL.txt"
set txtList to paragraphs of (read inputFile)
set {TID, my text item delimiters} to {my text item delimiters, ";"}
repeat with txtLines in txtList
set {theURL} to text items of txtLines
set theScript to "curl -o /dev/null -s -I -w '%{http_code}' " & theURL