Skip to content

Instantly share code, notes, and snippets.

View brock's full-sized avatar
😎

Brock Angelo brock

😎
View GitHub Profile
@brock
brock / export-iphotos.scpt
Created January 23, 2015 00:49
Export all photos in iPhoto. You are prompted for the directory they will be copied into. The original files are copied, and they get copied into individual folders for each date.
set destination to quoted form of POSIX path of (choose folder with prompt "Select the folder to create sub-folders and export photos")
tell application "iPhoto"
set tc to count photos
repeat with i from 1 to tc
try
tell photo i to my copyPhoto(date, image path, original path, title, destination)
end try
end repeat
end tell
@brock
brock / open-new-applications.scpt
Created January 22, 2015 03:33
Open new Applications in OSX
on adding folder items to this_folder after receiving this_item
tell application "Finder"
open this_item
end tell
end adding folder items to
@brock
brock / lock.scpt
Created January 19, 2015 16:46
AppleScripts to lock and unlock a macbook
tell application "System Events"
tell security preferences
set require password to wake to true
end tell
end tell
activate application "ScreenSaverEngine"
<TaskerData sr="" dvi="1" tv="4.6u3m">
<Profile sr="prof45" ve="2">
<cdate>1421519030211</cdate>
<clp>true</clp>
<edate>1421529685178</edate>
<id>45</id>
<mid0>47</mid0>
<nme>Sonos Wand</nme>
<Event sr="con0" ve="2">
<cname>Wave For Sonos</cname>
@brock
brock / gohome.xml
Created January 15, 2015 04:13
Go Home using Tasker
<TaskerData sr="" dvi="1" tv="4.6u3m">
<Profile sr="prof21" ve="2">
<cdate>1421280614090</cdate>
<edate>1421295126863</edate>
<id>21</id>
<mid0>19</mid0>
<nme>Go Home</nme>
<Event sr="con0" ve="2">
<code>3001</code>
<pri>0</pri>
@brock
brock / ZSH-Auto-Update-Date.md
Last active June 11, 2018 21:31
Update your ZSH Date in the shell automatically

Update your ZSH date automatically

update-time-automatically

@brock
brock / aliascheck.sh
Last active March 19, 2020 04:17
Alias checker
#!/bin/zsh
# aliascheck by @brock
# Description: checks each zsh command and reminds you if you already have an alias for that command
# Instructions:
# copy aliascheck.sh to ~/bin/aliascheck
# chmod +x ~/bin/aliascheck
# uncomment or modify line 14 below to source your aliases
# add the following to your ~/.zshrc or zsh profile:
#
# preexec() { zsh $(which aliascheck) $1}
@brock
brock / nodereinstall.sh
Last active May 13, 2024 03:24
Complete Node Reinstall. I've moved this to a repo at http://git.io/node-reinstall
#!/bin/bash
# node-reinstall
# credit: http://stackoverflow.com/a/11178106/2083544
## program version
VERSION="0.0.13"
## path prefix
PREFIX="${PREFIX:-/usr/local}"
@brock
brock / panes.sh
Last active February 10, 2016 06:16
4 x 4 iTerm Grid
#!/bin/bash
# panes
# make a 4x4 grid of iTerm panes
/usr/bin/env osascript <<-EOF
tell application "iTerm"
activate
set myterm to (make new terminal)
tell myterm
launch session "Panes"

I'd like to be able to control both the sidebar view and the graph view from the dropdown list.