As easy as 1, 2, 3!
Updated:
- Aug, 08, 2022 update
configdocs for npm 8+ - Jul 27, 2021 add private scopes
- Jul 22, 2021 add dist tags
- Jun 20, 2021 update for
--access=public - Sep 07, 2020 update docs for
npm version
| echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
| . ~/.bashrc | |
| mkdir ~/local | |
| mkdir ~/node-latest-install | |
| cd ~/node-latest-install | |
| curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
| ./configure --prefix=~/local | |
| make install # ok, fine, this step probably takes more than 30 seconds... | |
| curl https://www.npmjs.org/install.sh | sh |
| // All navigation that is relative should be passed through the navigate | |
| // method, to be processed by the router. If the link has a `data-bypass` | |
| // attribute, bypass the delegation completely. | |
| $(document).on("click", "a[href]:not([data-bypass])", function(evt) { | |
| // Get the absolute anchor href. | |
| var href = { prop: $(this).prop("href"), attr: $(this).attr("href") }; | |
| // Get the absolute root. | |
| var root = location.protocol + "//" + location.host + Application.root; | |
| // Ensure the root is part of the anchor href, meaning it's relative. |
| function slugify(text) | |
| { | |
| return text.toString().toLowerCase() | |
| .replace(/\s+/g, '-') // Replace spaces with - | |
| .replace(/[^\w\-]+/g, '') // Remove all non-word chars | |
| .replace(/\-\-+/g, '-') // Replace multiple - with single - | |
| .replace(/^-+/, '') // Trim - from start of text | |
| .replace(/-+$/, ''); // Trim - from end of text | |
| } |
| // http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
| // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
| // requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
| // MIT license | |
| (function() { | |
| var lastTime = 0; | |
| var vendors = ['ms', 'moz', 'webkit', 'o']; |
| package main | |
| import ( | |
| "fmt" | |
| ) | |
| type Stack struct { | |
| top *Element | |
| size int | |
| } |
| #!/bin/bash | |
| # | |
| # Shell script usable as web "server" | |
| # Code mostly copied from web, my contribution was to add the sanitation. | |
| # | |
| ### | |
| ### PARSE THE REQUEST | |
| ### |
| //Regular Expressions List | |
| //Short Tutorial | |
| \ // the escape character - used to find an instance of a metacharacter like a period, brackets, etc. | |
| . // match any character except newline | |
| x // match any instance of x | |
| ^x // match any character except x | |
| [x] // match any instance of x in the bracketed range - [abxyz] will match any instance of a, b, x, y, or z | |
| | // an OR operator - [x|y] will match an instance of x or y |
| package main | |
| import ( | |
| "fmt" | |
| ) | |
| type Stack struct { | |
| top *Element | |
| size int | |
| } |