Stopping a Jekyll server with ctrl-z can cause issues as the process is not stopped fully. To kill it:
$ lsof -wni tcp:4000
$ kill -9 <PID of process>
And next time, use crtl-c to stop.
| .overflowing-text { | |
| display: block; | |
| overflow: hidden; | |
| white-space: nowrap; | |
| text-overflow: ellipsis; | |
| } |
| detectFlash: -> | |
| if navigator.plugins["Shockwave Flash"] | |
| return true | |
| return false | |
| # usage: | |
| # if detectFlash() | |
| # console.log "Flash supported" | |
| # else |
| # ---------------------------------------------- | |
| # Quick method: | |
| # ---------------------------------------------- | |
| Options +MultiViews | |
| # With Apache MultiViews, the server will look for files that match the requested resource (eg. a request for "site.com/page" will serve "site.com/page.php") | |
| # ---------------------------------------------- | |
| # Long method: |
Stopping a Jekyll server with ctrl-z can cause issues as the process is not stopped fully. To kill it:
$ lsof -wni tcp:4000
$ kill -9 <PID of process>
And next time, use crtl-c to stop.
| var app = new App('arg'); | |
| App = function(arg) { | |
| this.APP_CONSTANT = 0; | |
| this.appVar = arg; | |
| this._init(); | |
| } |
| $ python -m SimpleHTTPServer 8000 |
| <?php | |
| header('Content-Type: application/json'); | |
| function scan(){ | |
| $dirOne = scandir('../data/one'); | |
| $dirTwo = scandir('../data/two'); | |
| $response = (object) array('dirOne' => $dirOne, 'dirTwo' => $dirTwo); |
| $ mkdir newdir && cd $_ |
| <html> | |
| <head> | |
| <!-- Link to import file --> | |
| <link rel="import" href="template.html" name="template1"> | |
| </head> | |
| <body> | |
| <!-- a container div with an id to match the name attribute of the import link --> | |
| <div class="container" id="template1"> | |
| <!-- the contents of template.html will be inserted here at runtime --> |
| request = new XMLHttpRequest(); | |
| request.open('GET', '/data/data.json', true); | |
| request.onload = function() { | |
| if (this.status >= 200 && this.status < 400){ | |
| data = JSON.parse(this.response); | |
| console.log(data); | |
| } else { | |
| console.log("Data error"); | |
| } |