This method uses Liquid tags and works when published to Github Pages. It doesn't work in Github's viewer when browsing the repo.
{{ "{% highlight html linenos "}}%}
<div>this is some preformatted code</div>
{{ "{% endhighlight "}}%}
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2279031/hack.sh | sh | |
| # |
These are the steps I take to set up a new install of OSX Mountain Lion for web development.
Run my fork of Mathias Bynens' legendary script:
| // https://en.wikipedia.org/wiki/Alpha_scale | |
| // http://www.microtonal-synthesis.com/scale_carlos_alpha.html | |
| var notes = [ | |
| // the Alpha scale is generated by dividing a perfect fifth into 9 steps | |
| // with a root of A4 (440hz), a perfect fifth is E4 (659.25hz) | |
| // to get a single step in the Alpha scale, we perform (659.25-440)/9 = 24.36hz | |
| // a major third in the alpha scale is 5 steps: 24.36*5 = 121.8hz | |
| // in this way, we can take any ROOT note in hertz and derive an Alpha scale from it |
| // repo here: https://github.com/caycefischer/sketch-copyeditor | |
| var com = {}; | |
| com.updatecopy = { | |
| debugLog: function(msg) { | |
| if(this.debug) log(msg); | |
| }, |
| <!-- http://davidwalsh.name/hide-address-bar --> | |
| <!-- iOS web app, deletable if not needed --> | |
| <meta name="apple-mobile-web-app-capable" content="yes"> | |
| <meta name="apple-mobile-web-app-status-bar-style" content="black"> | |
| <!-- Prevent links in standalone web apps opening Mobile Safari. https://gist.github.com/1042026 --> | |
| <script>(function(a,b,c){if(c in b&&b[c]){var d,e=a.location,f=/^(a|html)$/i;a.addEventListener("click",function(a){d=a.target;while(!f.test(d.nodeName))d=d.parentNode;"href"in d&&(d.href.indexOf("http")||~d.href.indexOf(e.host))&&(a.preventDefault(),e.href=d.href)},!1)}})(document,window.navigator,"standalone")</script> | |
| <!-- iOS startup images: http://miniapps.co.uk/blog/post/ios-startup-images-using-css-media-queries --> |
| # a script following this guide: | |
| # http://coolestguyplanettech.com/downtown/install-and-configure-apache-mysql-php-and-phpmyadmin-osx-108-mountain-lion | |
| # for enabling apache on OS X Mountain Lion | |
| # --- | |
| #start up apache | |
| sudo apachectl start | |
| # create ~/Sites |
| <!-- as per Mathias Bynens: http://mathiasbynens.be/notes/touch-icons#sizes --> | |
| <link rel="apple-touch-icon-precomposed" sizes="144x144" href="/apple-touch-icon-144x144-precomposed.png"> | |
| <link rel="apple-touch-icon-precomposed" sizes="120x120" href="/apple-touch-icon-120x120-precomposed.png"> | |
| <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/apple-touch-icon-114x114-precomposed.png"> | |
| <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/apple-touch-icon-72x72-precomposed.png"> | |
| <link rel="apple-touch-icon-precomposed" href="/apple-touch-icon-precomposed.png"> <!-- this is 57x57 --> | |
| <!-- as per Jonathan Neal: http://www.jonathantneal.com/blog/understand-the-favicon/ --> | |
| <link rel="icon" href="/favicon.png"> | |
| <!--[if IE]><link rel="shortcut icon" href="/favicon.ico"><![endif]--> |
| // '$' helper function | |
| window.$ = function(selector) { | |
| return document.querySelector(selector); | |
| }; | |
| // usage | |
| $('#nic').src = 'http://placecage.com/c/400/300'; |