Skip to content

Instantly share code, notes, and snippets.

View nilswindisch's full-sized avatar

Nils Windisch nilswindisch

View GitHub Profile
@nilswindisch
nilswindisch / update_nativefier.sh
Created January 28, 2017 10:49
Update nativefier
#!/bin/bash
echo "Updating nativefier globally"
npm update -g nativefier@latest
echo "nativefier updated"
@nilswindisch
nilswindisch / update_node-sass.sh
Created January 28, 2017 10:48
Update node-sass
#!/bin/bash
echo "Updating node-sass globally"
npm update -g node-sass@latest
echo "node-sass updated"
@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"
@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 / 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 / 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 / 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 / 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 / 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 / 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