Skip to content

Instantly share code, notes, and snippets.

@Zettt
Zettt / expandurl.sh
Created June 12, 2014 09:02
Expand short URL from clipboard. Works with Keyboard Maestro, TextExpander, Alfred, LaunchBar, you name it.
curl -sIL `pbpaste` | grep ^[lL]ocation | cut -c 11- | pbcopy
@Zettt
Zettt / OmniFocus Quarantine Inbox.applescript
Last active August 29, 2015 14:02
Do you also have tons of tasks in your inbox, which you probably never going to do? Well, then this script has been made for you! It creates a new project where it will move all inbox tasks to. After your inbox is clear that new project is set to "dropped" and all that crap is out sight, forever.
tell application "OmniFocus"
tell default document
-- crate quarantined project for tasks to be moved to
-- name in this version is »Quarantined Inbox: YYYY-MM-DD«
-- some other versions provided below, e.g. »Mon: 23. 06. 2015«
--set quarantineDayName to do shell script "date -v +0d +'%a: %d. %m. %Y'"
--set quarantineDayName to do shell script "date -v +0d +'%d. %m. %Y'"
set quarantineDayName to do shell script "date -v +0d +'%Y-%m-%d'"
set quarantineProject to make new project with properties {name:"Quarantined Inbox: " & quarantineDayName}
@Zettt
Zettt / ssh.sh
Created August 10, 2014 18:03
Some SSH Tricks
Copy your ssh public key to a server from a machine that doesn’t have ssh-copy-id
#/bin/bash
if [ -z "$2" ]
then
echo "Usage: $0 id_file hostname|ssh-nickname"
else
cat "$1" |ssh $2 'sh -c "cat - >>~/.ssh/authorized_keys"'
fi
@Zettt
Zettt / inspect.scpt
Created August 25, 2014 12:05
Inspect App/Process with AppleScript: The beginnings of a LaunchBar Action to get certain information about running processes.
tell application "LaunchBar"
set bundleID to id
set appVersion to version
set appName to name
log appName & "\n" & bundleID & "\n" & appVersion
tell application "System Events"
tell process "LaunchBar"
set bundleID to bundle identifier
set arch to architecture
@Zettt
Zettt / notification center.scpt
Created September 18, 2014 13:08
Toggle Notification Center's Do Not Disturb on OS X Yosemite. Brought to you by Automator.
-- Toggle Notification Center's DND on Yosemite
tell application "System Events"
option key down
delay 0.1
try
click menu bar item "Notification Center" of menu bar 2 of application process "SystemUIServer"
end try
try
click menu bar item "NotificationCenter, Do Not Disturb enabled" of menu bar 2 of application process "SystemUIServer"
@Zettt
Zettt / die perfekte rasur.md
Last active August 29, 2015 14:06
Meine Barcamp Stuttgart 7 (2014) Session zum Thema "Die perfekte Rasur". Ihr könnt dieses Markdown direkt mit [Deckset](http://mosx.tv/1st2Qyo) aufmachen, wenn ihr es habt. #bcs7

[fit] Die perfekte Rasur

Andreas Zeitler (@zettt)

gentlebox.de


[fit] Aktueller Stand

@Zettt
Zettt / die perfekte rasur 2.md
Last active August 29, 2015 14:06
Meine Barcamp Stuttgart 7 (2014) Session zum Thema "Die perfekte Rasur". Diese hier sind ohne Bilder, damit man die Speaker Notes besser lesen kann. #bcs7

Die perfekte Rasur

Andreas Zeitler (@zettt)

gentlebox.de


Aktueller Stand

@Zettt
Zettt / So tickt YouTube #mxsw 2014-09-22.md
Last active August 29, 2015 14:07
Meine Präsentation im Original mit Speaker Notes. Folien hier: https://www.slideshare.net/Zettt/so-tickt-you-tube-mxsw-20140922

[fit] So tickt YouTube

Andreas Zeitler, zCasting 3000

@zettt, zcasting3000.com


[fit] Hintergrund

^ Warum diese Präsi überhaupt?

@Zettt
Zettt / after.txt
Created January 4, 2015 14:51
Comparing Instagram videos before and after upload
General
Complete name : /Users/zettt/Desktop/IMG_0292.mov
Format : MPEG-4
Format profile : Base Media / Version 2
Codec ID : mp42
File size : 3.95 MiB
Duration : 9s 643ms
Overall bit rate : 3 437 Kbps
Encoded date : UTC 2015-01-04 14:29:22
Tagged date : UTC 2015-01-04 14:29:25
@Zettt
Zettt / spotifyplayback.scpt
Created May 23, 2015 08:07
Playhead forward/backward - Because Spotify has stupidly removed the possibility to skip forward and backward using keyboard shortcuts, we now have to resort to do this via AppleScript. Well, it could be harder. The script below jumps 3 seconds ahead. Bind to keyboard shortcuts such as →. You may use ⇧→ to skip 10 seconds. This is how it was in …
tell application "Spotify"
if player state is playing then
set playPos to player position + 3.0
set player position to playPos
end if
end tell