JamesBachini.com

0

Beautiful Email Template [Download]

I loved this email layout so I created my own version which you can download from here: http://jamesbachini.com/misc/email.zip View the html page: http://jamesbachini.com/misc/email.htm Update all the images and links before you send out. The background skyline is in the zip file, you could modify to suit your niche just keep the color the same.

0

Block bots and crawlers with .htaccess and robots.txt

If you want to block search engine and crawler bots from visiting your pages you can do so by uploading the following files to the / directory on your site. Double check you aren’t rewriting over any .htaccess file before you do it. http://jamesbachini.com/misc/blockbots/robots.txt http://jamesbachini.com/misc/blockbots/.htaccess (.htaccess link doesn’t work because it’s a no read file. So I have uploaded them as a zip) Download both files in a zip These...

vibrating phone 0

Using javascript to make a mobile landing page vibrate the phone

The following javascript uses the Vibrate API to make a phone vibrate when a page is loaded. You can time it with setTimeouts or onclick/onscroll if required. <html> <script> navigator.vibrate = navigator.vibrate || navigator.webkitVibrate || navigator.mozVibrate || navigator.msVibrate; navigator.vibrate(1000); // 1 second </script> Hello Buzz </html> There’s more information available at: http://www.sitepoint.com/use-html5-vibration-api/ This can be used to draw a users attention to the landing page or to create message effects...

ben horowitz hard things about hard things summary 0

Ben Horowitz Hard things about hard things

Andreeson Horowitz is Silicon Valleys leading venture capital firm. Their portfolio itself is worth a flick through at: Portfolio It’s incredible how many of the tech startup success stories they have been involved in. Ben Horowitz is one of the cofounders and in his book the Hard things about hard things he talks about his time before he started the VC firm. He was CEO of Soundcloud/Opsware and describes himself...

node moz api 0

Node.js client for Moz API (MozScape)

I was doing some work with SEO domains and realised there wasn’t a node.js client for the MozScape API… so after Googling and not finding what I was looking for I built one. What this basically does is provide SEO metrics on the URL you provide. Here’s the download link: http://jamesbachini.com/misc/moznode/moznode.zip Full code below: var request = require(“request”); var crypto = require(‘crypto’); // Get credentials from https://moz.com/products/mozscape/access mozAccessID = “mozscape-xxxxxxxxxx”;...

0

Regex’s | Regular Expressions in Programming

Today I saw a nice script which redirects mobile traffic by searching the useragent string for a list of search terms related to mobile devices. This is PHP but I’ll show you how you can use this type of “regex” in Javascript too. <?php $useragent=$_SERVER[‘HTTP_USER_AGENT’]; if(preg_match(‘/^1207.*|^3gso.*|^4thp.*|^501i.*|^502i.*|^503i.*|^504i.*|^505i.*|^506i.*|.*Fennec.*|^6310.*|^6590.*|^770s.*|^802s.*|.*a100.*|.*a510.*|.*a511.*|^abac.*|^acer.*|^acoo.*|^acs.*|^aiko.*|^airn.*|.*alacatel.*|^alav.*|^alca.*|^alco.*|^amoi.*|^Amoi.*|.*android.*|^anex.*|^anny.*|^anyw.*|^aptu.*|^arch.*|^argo.*|^aste.*|^asus.*|^ASUS.*|^attw.*|^au.*|^audi.*|^Audiovox.*|^AU-MIC.*|^aur.*|^aus.*|^avan.*|^beck.*|^bell.*|^benq.*|^BenQ.*|^bilb.*|^bird.*|^Bird.*|^blac.*|.*BlackBerry.*|^blaz.*|.*Blazer.*|.*boxee.*|.*BRAVIA.*|^brew.*|^brvw.*|^bumb.*|^bw.*|^c55.*|^capi.*|^ccwa.*|^cdm.*|^CDM.*|.*CE-HTML.*|^cell.*|^chtm.*|^cldc.*|^cmd.*|^comp.*|^cond.*|.*CorePlayer.*|^craw.*|^dait.*|^dall.*|^dang.*|^dbte.*|^dc.*|.*dell streak.*|^devi.*|^dica.*|.*DLNA.*|.*DLNADOC.*|^dmob.*|^doco.*|^DoCoMo.*|^dopo.*|^dopod.*|^ds.*|^ds12.*|^el49.*|^elai.*|^eml2.*|^emul.*|^eric.*|.*Ericsson.*|^erk0.*|^esl8.*|^ez40.*|^ez60.*|^ez70.*|^ezos.*|^ezwa.*|^ezze.*|^fake.*|^fetc.*|^fly.*|.*FlyCast.*|.*foobar2000.*|^g1.*|^g560.*|^gene.*|^gf.*|^go.*|.*GomPlayer.*|^good.*|.*GoogleTV.*|^grad.*|^grun.*|^haie.*|^Haier.*|.*hbbtv.*|.*HbbTV.*|^hcit.*|^hd.*|^hei.*|^hipt.*|^hita.*|^HP.*|.*htc.*|^htca.*|^htcg.*|^htcp.*|^htcs.*|^htct.*|^http.*|^huaw.*|.*Huawei.*|^hutc.*|^i230.*|^iac.*|^ibro.*|^idea.*|.*iemobile.*|^ig01.*|^ikom.*|^im1k.*|^i-mobile.*|^inno.*|.*ipad.*|^ipaq.*|.*iPAQ.*|.*iphone.*|.*iPod.*|^iris.*|.*iTunes.*|^jata.*|^java.*|^jbro.*|^jemu.*|^jigs.*|^kddi.*|^KDDI.*|^keji.*|^kgt.*|.*kindle.*|^klon.*|^KONKA.*|^kpt.*|^kwc.*|^KWC.*|^kyoc.*|^kyok.*|.*Large Screen.*|^leno.*|^Lenovo.*|^lexi.*|^lg.*|^lg50.*|^lg54.*|^lge.*|^libw.*|^lynx.*|^m3ga.*|^m50.*|^mate.*|^maui.*|^maxo.*|^mc01.*|^mc21.*|^mcca.*|^medi.*|^merc.*|^meri.*|^midp.*|.*midp.*|.*mini.*|^mio8.*|^mioa.*|.*Miro.*|^mits.*|^mmef.*|^mo01.*|^mo02.*|^mobi.*|.*mobile.*|^mode.*|^modo.*|^mot.*|^motv.*|^mozz.*|.*MPlayer.*|.*MSN.*|^mt50.*|^mtp1.*|^mtv.*|^mwbp.*|^mywa.*|^n100.*|^n101.*|^n102.*|^n202.*|^n203.*|^n300.*|^n302.*|^n500.*|^n502.*|^n505.*|^n700.*|^n701.*|^n710.*|^nec.*|^NEC-.*|^nem.*|^neon.*|^netf.*|.*NETTV.*|^newg.*|^NEWGEN.*|^newt.*|.*Nexus 10.*|.*Nexus 7.*|.*Nintendo.*|^nok6.*|^noki.*|.*Nokia.*|.*Novarra.*|^nzph.*|^o2.*|.*o2.*|.*O2.*|^o2im.*|.*Opera.Mobi.*|^opti.*|^opwv.*|^oran.*|^owg1.*|^p800.*|.*Palm.*|^pana.*|^Panasonic.*|^pand.*|^pant.*|^PANTECH.*|^pdxg.*|^PG.*|^pg13.*|^phil.*|^Philips.*|^pire.*|^play.*|.*PLAYSTATION 3.*|.*Plex.*|^pluc.*|^pock.*|.*pocket.*|^port.*|^portalmmm.*|^pose.*|^PPC.*|^prox.*|.*PS3.*|^psio.*|.*psp.*|^qc07.*|^qc12.*|^qc21.*|^qc32.*|^qc60.*|^qci.*|^qtek.*|^Qtek.*|.*QuickTime.*|^qwap.*|^r380.*|^r600.*|^raks.*|^rim9.*|^rove.*|^rozo.*|^s55.*|^sage.*|^Sagem.*|^SAGEM.*|^sama.*|^samm.*|^sams.*|.*SAMSUNG.*|^sany.*|.*Sanyo.*|^sava.*|^sc01.*|^sch.*|^SCH.*|.*SCH-.*|.*sch-i800.*|^scoo.*|^scp.*|^sdk.*|^se47.*|^sec.*|^SEC.*|^sec0.*|^sec1.*|^semc.*|.*SEMC-Browser.*|^send.*|^Sendo.*|^seri.*|^sgh.*|^SGH.*|.*SGH-.*|.*sgh-t849.*|^shar.*|^Sharp.*|.*shw-m180s.*|^sie.*|^SIE.*|^siem.*|^SIEMENS.*|.*silk.*|^sl45.*|^slid.*|^smal.*|^smar.*|.*Smarthub.*|.*smartphone.*|.*SmartTV.*|.*SMART-TV.*|^smb3.*|^smit.*|^smt5.*|^soft.*|^SoftBank.*|^sony.*|^SonyEricsson|^SonyEricsson.*|.*SonyEricsson.*|^sp01.*|^sph.*|^SPH.*|^spv.*|^sy01.*|^symb.*|.*symbian.*|.*SymbianOS.*|^t218.*|^t250.*|^t600.*|^t610.*|^t618.*|.*tablet.*|^tagt.*|^talk.*|^tcl.*|^tdg.*|.*teleca.*|^teli.*|^telm.*|^tim.*|^topl.*|^tosh.*|.*Toshiba.*|.*treo.*|^ts70.*|^tsm.*|^tsm3.*|^tsm5.*|.*up\.browser.*|^upg1.*|.*up\.link.*|.*UPnP.*|^upsi.*|^UTS.*|^utst.*|^v400.*|^v750.*|^veri.*|^Vertu.*|^virg.*|^vite.*|^vk40.*|^vk50.*|^vk52.*|^vk53.*|.*VLC media player.*|^vm40.*|^voda.*|.*vodafone.*|^vulc.*|^vx52.*|^vx53.*|^vx60.*|^vx61.*|^vx70.*|^vx80.*|^vx81.*|^vx83.*|^vx85.*|^vx98.*|^w3c.*|.*WAFA.*|^wap.*|.*wap.*|^wapa.*|^wapi.*|^wapj.*|^wapm.*|^wapp.*|^wapr.*|^waps.*|^wapt.*|^wapu.*|^wapv.*|^wapy.*|^webc.*|.*webOS.*|.*WebTV.*|^whit.*|.*BOLT.*|^wig.*|.*wii.*|^winc.*|.*windows ce.*|.*Windows.CE.*|.*Windows-Media-Player.*|.*WindowsPhone.*|.*Windows Phone.*|^winw.*|^wmlb.*|^wonu.*|^x700.*|.*XBMC.*|.*xbox.*|^xda.*|.*Xda.*|^xda2.*|^xdag.*|^yas.*|^your.*|^zeto.*|^ZTE.*/i’, $useragent)) {     header(‘Location: http://mobile.mysite.com’); } ?> So the code above will redirect mobile devices...

delivering happiness tony hsieh 0

Book Review: Delivering Happiness – Tony Hsieh

To get through this you are going to need to read a hundred or so pages of why Zappos is such an amazing company how how they are changing the world. That said Tony does make some interesting points throughout the book. His story of how he got started in the tech industry first with Linkshare and then with Zappos is quite an interesting read. Profits > Passion > Purpose...

0

A simple floating feedback/support button

It can be very useful for online businesses to collect feedback from their customers. This gives us priceless insight in to their wants, needs and problems. One quick way to start collecting feedback is to place a floating button on the side of your website which opens up a little form. This can be used for support queries too just change the name of the button. There is a working...

0

New Page Level Ads – Adsense

These new ads are now available in the Adsense platform: They can be added to your adsense site and will only pop on mobile when Google thinks it’s a good time to launch an overlay. I’m not sure how they calculate this but it is described as displaying at “optimal times”. Most importantly you can add these without them counting towards your three ads per page limit. “Designed by Google...