Quick Browser Detection One Liners

// You can expand this out in any line below // but it makes things much more readable var ua = navigator.userAgent.toString().toLowerCase(); //Browsers var IE6 = false /*@cc_on || @_jscript_version < 5.7 @*/ var IE7 = (document.all && !window.opera && window.XMLHttpRequest && ua.indexOf(‘trident/4.0’) == -1) ? true : false; var IE8 = (ua.indexOf(‘trident/4.0’) != -1);… Continue reading Quick Browser Detection One Liners

Published
Categorized as Javascript

Vertical space in bootstrap

I use Bootstrap for most personal projects lately but one thing that consistently gets me is the lack of vertical spacing classes. Quick fix I added these classes to my bootstrap stylesheet .voffset { margin-top: 2px; } .voffset1 { margin-top: 5px; } .voffset2 { margin-top: 10px; } .voffset3 { margin-top: 15px; } .voffset4 { margin-top:… Continue reading Vertical space in bootstrap

Published
Categorized as CSS

Checking if a UITableViewCell is fully visible

Sometime you need to know if a UITableViewCell is completely visible and for those times there’s this handy UITableViewCell category. //Place in UITableViewCell Category – (BOOL) isCompletelyVisible { // For parents category see pdenya.com/g/uiview_parents UITableView *tableview = (UITableView *)[self parents:[UITableView class]]; CGRect rect = [tableview rectForRowAtIndexPath:[tableview indexPathForCell:self]]; rect = [tableview convertRect:rect toView:tableview.superview]; BOOL completelyVisible =… Continue reading Checking if a UITableViewCell is fully visible

HelloSign for Gmail

HelloSign for Gmail is a browser extension for Chrome, FireFox and Safari that lets users fill out and sign documents without ever leaving Gmail. The user clicks the sign button next to an attachment and the file is uploaded to HelloSign and the HelloSign editor is opened in a lightbox for the user to sign… Continue reading HelloSign for Gmail

Published
Categorized as Work

Hiding the WP Admin Bar

There’s a few plugins for hiding the WordPress admin bar that shows up on top of your site when you’re logged in but it seems like overkill. If you don’t care about preventing it from loading you can drop this in your stylesheet at wp-admin/themes.php?page=editcss to hide it. html { margin-top: 0!important; } #wpadminbar {… Continue reading Hiding the WP Admin Bar

Published
Categorized as devtools

Accepting developer roles on facebook

Log into Facebook and go to https://developers.facebook.com/apps. Register as a developer if you haven’t yet This process is a pain and involves entering your phone number and receiving a confirmation text. Check for invites You should get a notification at the top about any pending invites. Click through and confirm.

Published
Categorized as devtools