Paul Knittel

WYSIWYG Editors for the Web

Disabling text select

Pretty easy to do with this CSS:

p {
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -o-user-select: none;
  user-select: none;

DNS nightmare with Heroku

Getting DNS setup with Heroku isn’t exactly trivial

For real. This changes everything:

Experimental project to improve mouse in OS X, so it’s more like Windows.

(via dinhstag)


Paypal - When the PayPal app is in iOS app switch mode, activity and account details are blurred.

SASS - combinining mixins and multiple variables

At the time took me a while to work this out, so just here for reference:

@mixin calc($property, $expression…) {
  #{$property}: -moz-calc(#{$expression});
  #{$property}: -webkit-calc(#{$expression});
  #{$property}: calc(#{$expression});

Now you can use it like this to specify a calc:

.content { 
  @include calc(width, #{100%} - #{$menubar_width}); 

Engineers are lazy… and that’s a good thing

The easiest solutions are often the best ones. Lazy people find easy solutions. Read the full article here.

My first experience with phone gap

What color is your name?

Thanks to some holdover from the Netscape days bgcolor can accept all sorts of names and parse them into colors. Why does html think chuck norris is a color?

Try it for yourself in the codepen below. Enter any name including your last (this is because most first names are to short to produce anything else than black) and see your true colors.

See the Pen What color is your name? by Paul Knittel (@xypaul) on CodePen

Javascript youtube link string to embedded iframe using regex

Great regex tutorial:

$text is a sting containing html with youtube as links (pulled in through facebook graph api) - the code below converts simple youtube links into embedded iframes.

$text = @preg_replace(“#https://(www.)?\?v=([^ &\n]+)(&.*?(\n|\s))?#i”, ‘<div align=”center”><object width=”380” height=”220”><param name=”movie” value=”$2”></param><embed src=”$2” type=”application/x-shockwave-flash” width=”380” height=”220”></embed></object></div>’, $text);

OS X 10.9 Mavericks SourceTree - pushing to SVN from git is broken - EASY FIX

After upgrading to OS X 10.9 Source Tree struggled to push to SVN, due to some missing dependencies. With some symlinks this is easily fixed:

sudo ln -s /Applications/ /System/Library/Perl/Extras/5.16/SVN

sudo ln -s /Applications/ /System/Library/Perl/Extras/5.16/auto/SVN