Skip to content

Instantly share code, notes, and snippets.

View nilswindisch's full-sized avatar

Nils Windisch nilswindisch

View GitHub Profile
@nilswindisch
nilswindisch / removeFileFromItunes.applescript
Created August 29, 2011 14:57
Removes one more selected files (in iTunes) from iTunes and moves them to the trash
tell application "iTunes"
if selection is not {} then
set allTracks to selection
repeat with this_track in allTracks
set the file_to_delete to (get location of this_track)
set thisOne to this_track
delete (some track of library playlist 1 whose database ID is (get database ID of thisOne))
tell application "Finder" to delete the file_to_delete
end repeat
end if
@nilswindisch
nilswindisch / openClipboardContentInBrowser.applescript
Created August 29, 2011 15:10
Opens the clipboard content in the default browser #applescript #itunes #nilswindisch
set the clipboard to «class ktxt» of ((the clipboard as text) as record)
set theUrl to (the clipboard)
open location theUrl
@nilswindisch
nilswindisch / tm_home_go.sh
Last active September 27, 2015 09:07
Start Time Machine backup when home
#!/bin/bash
sudo tmutil enable
sleep 2
sudo tmutil setdestination /Volumes/data/
growlnotify -a 'Time Machine' -m 'Time Machine enabled and /Volume/data/ mounted'
sleep 20
tmutil startbackup
growlnotify -a 'Time Machine' -m 'Starting Time Machine Backup'
@nilswindisch
nilswindisch / Return Chrome Tab URL and Title for MediaWiki.applescript
Last active December 15, 2015 03:29
Returns the URL and Title of the foremost Google Chrome tab in MediaWiki Syntax to the clipboard.
-- quick and dirty, but works with latest Google Chrome and Mac OS X as of march 2013
set theReturn to ""
tell application "Google Chrome"
set frontIndex to active tab index of front window
set theUrl to URL of tab frontIndex of front window
set theTitle to title of tab frontIndex of front window
set theReturn to theReturn & "[" & theUrl & " " & theTitle & "]"
end tell
set the clipboard to theReturn
@nilswindisch
nilswindisch / Install PhantomJS and pa11y on a Mac
Last active January 2, 2016 19:59
testet on Mac OS X 10.9.1 with node.js 0.10.22
* Download PhantomJS here http://phantomjs.org/download.html
* Unzip and move /phantomjs-X.x.X-macosx/bin/phantomjs to Macintosh HD/bin/
* test at least "Hello World!" and "Page Loading" in some random folder on your HDD
* make sure nodejs is installed
* install [pa11y](https://github.com/nature/pa11y) with 'sudo npm install -g pa11y'
* try some examples
** hello.js
** screenshot.js
** $ pa11y www.sub.uni-goettingen.de
** $ pa11y -r csv www.sub.uni-goettingen.de > report.csv
@nilswindisch
nilswindisch / SassMeister-input.scss
Created January 25, 2014 13:47
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.2)
// Compass (v1.0.0.alpha.17)
// Harsh (v1.0.0)
// ----
@import "harsh";
html, body {
height: 100%;
@nilswindisch
nilswindisch / Sublime Keyboard Stuff I actually use
Last active August 29, 2015 14:11
Sublime Keyboard Stuff I actually use
# ToC
* Focus Sidebar
* open File
* Pretty Print JSON
* Toggle Sidebar
* Wrap in Tag
## Focus Sidebar
CTRL + 0

Keybase proof

I hereby claim:

  • I am nilswindisch on github.
  • I am nilswindisch (https://keybase.io/nilswindisch) on keybase.
  • I have a public key whose fingerprint is CB23 39F2 53C3 566B 401C 5FB9 86D0 0E68 16AD 39F8

To claim this, I am signing this object:

@nilswindisch
nilswindisch / Sketch App Keyboard Stuff I actually use
Created February 9, 2015 08:40
Sketch App Keyboard Stuff I actually use
# ToC
* Color Picker
# Color Picker
CTRL + C
@nilswindisch
nilswindisch / update_stylelint.sh
Created January 28, 2017 10:47
Update stylelint
#!/bin/bash
echo "Updating stylelint globally"
npm update -g stylelint@latest
echo "stylelint updated"