Is there a Content Delivery Network (CDN) that hosts Google Code Prettify?

Found it! http://www.cdnjs.com/libraries/prettify <script src=”http://cdnjs.cloudflare.com/ajax/libs/prettify/r298/run_prettify.js” type=”text/javascript”></script> <link href=”http://cdnjs.cloudflare.com/ajax/libs/prettify/r298/prettify.css” type=”text/css”> Update: https://github.com/cdnjs/cdnjs/issues/695 (see bottom of page)

Benefits vs. Pitfalls of hosting jQuery locally [closed]

I always use the CDN (Content Delivery Network) from Google. But just in case it’s offline: <script src=”http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js”></script> <script>!window.jQuery && document.write(‘<script src=”jquery-1.4.2.min.js”><\/script>’)</script> Grab Google CDN’s jQuery and fallback to local if necessary Edit: If you don’t need to support IE6 and your site has partial https usage you can remove the http as well: <script … Read more

How to link files directly from Github (raw.github.com)

The great service RawGit was already mentioned, but I’ll throw another into the ring: GitCDN.link Benefits: Lets you link to specific commits, as well as auto-get the latest (aka master) Incurs no damage from high traffic volumes; RawGit asks that it’s dev.rawgit.com links be only used during development, where as GitCDN give you access to … Read more

How to fallback to local stylesheet (not script) if CDN fails

One could use onerror for that: <link rel=”stylesheet” href=”cdn.css” onerror=”this.onerror=null;this.href=”https://stackoverflow.com/questions/7383163/local.css”;” /> The this.onerror=null; is to avoid endless loops in case the fallback it self is not available. But it could also be used to have multiple fallbacks. However, this currently only works in Firefox and Chrome. Update: Meanwhile, this seems to be supported by all … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)