Skip to content

Instantly share code, notes, and snippets.

View dasmurphy's full-sized avatar

Torsten Stelling dasmurphy

View GitHub Profile
@dasmurphy
dasmurphy / fixJumpingScrollbar.css
Created October 6, 2018 20:00
Fix 'jumping scrollbar' issue using only CSS
/*
When centering a page with CSS like margin: 0 auto;,
there's a small gotcha: the page will 'jump' a little
on certain browsers when navigating between short and long pages.
This is because the scrollbar gets hidden with short
pages and is shown again with longer pages,
which makes the page move a little horizontally.
classic fix:
@dasmurphy
dasmurphy / pliim-turnOff.scpt
Created January 10, 2018 10:37 — forked from zehfernandes/pliim-turnOff.scpt
One click and be ready to go up on stage and shine! - https://zehfernandes.github.io/pliim/
# Turn on Notifications
do shell script "defaults -currentHost write com.apple.notificationcenterui doNotDisturb -bool FALSE; defaults -currentHost delete com.apple.notificationcenterui doNotDisturbDate; osascript -e 'quit application \"NotificationCenter\" ' && killall usernoted" -- this set 'Do not disturb' to false in the pref
# Show Desktop
do shell script "defaults write com.apple.finder CreateDesktop -bool true; killall Finder"
# Show all windows
tell application "System Events"
set visible of (every process) to true
end tell
@dasmurphy
dasmurphy / rotate.less
Last active November 10, 2015 09:47 — forked from swider/rotate.less
LESS Rotate Mixin for IE
.rotate(@val) {
-moz-transform: rotate(@val); /* FF3.5+ */
-o-transform: rotate(@val); /* Opera 10.5 */
-webkit-transform: rotate(@val); /* Saf3.1+, Chrome */
-ms-transform: rotate(@val); /* IE9 */
transform: rotate(@val);
/* IE6-IE8 */
@radians: ~`parseInt("@{val}") * Math.PI * 2 / 360`;
@costheta: ~`Math.cos("@{radians}")`;