sudo vi /etc/wsl.conf
add
[network]
generateResolvConf=false
| // Taken from regex at bottom of this section https://html.spec.whatwg.org/#e-mail-state-(type=email) | |
| const emailRegex = /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/; |
| idx = (p, o) => p.replace(/\[/g,'.').replace(/\]/g, '').split('.').reduce((xs, x) => (typeof xs !== 'undefined' && typeof xs[x] !== 'undefined') ? xs[x] : undefined, o) |
| # Get root up in here | |
| sudo su | |
| # Update and begin installing some utility tools | |
| apt-get -y update | |
| #install git | |
| apt-get install git-all | |
| # Get latest version of node |
| Any objects that are scope acessible to a closure is scope acessible to all closures of that same scope level |
| ssh-keygen -t rsa -b 4096 -C "[email protected]" | |
| ssh-add ~/.ssh/id_rsa | |
| eval "$(ssh-agent -s)" (windows) | |
| clip < ~/.ssh/id_rsa.pub | |
| https://github.com/settings/ssh |
| # Note: ~/.ssh/environment should not be used, as it | |
| # already has a different purpose in SSH. | |
| env=~/.ssh/agent.env | |
| # Note: Don't bother checking SSH_AGENT_PID. It's not used | |
| # by SSH itself, and it might even be incorrect | |
| # (for example, when using agent-forwarding over SSH). | |
| agent_is_running() { |
| //http://stackoverflow.com/questions/5186638/how-to-asynchronously-load-css-using-jquery/32614409#32614409 | |
| var stylesheet = document.createElement('link'); | |
| stylesheet.href = '/inc/body/jquery/css/start/jquery-ui-1.8.10.custom.css'; | |
| stylesheet.rel = 'stylesheet'; | |
| stylesheet.type = 'text/css'; | |
| // temporarily set media to something inapplicable to ensure it'll fetch without blocking render | |
| stylesheet.media = 'only x'; | |
| // set the media back when the stylesheet loads | |
| stylesheet.onload = function() {stylesheet.media = 'all'} |
| // array utils | |
| // ================================================================================================= | |
| const combine = (...arrays) => [].concat(...arrays); | |
| const compact = arr => arr.filter(Boolean); | |
| const contains = (() => Array.prototype.includes | |
| ? (arr, value) => arr.includes(value) | |
| : (arr, value) => arr.some(el => el === value) |
| function getAllMethods(object) { | |
| return Object.getOwnPropertyNames(object).filter(function(property) { | |
| return typeof object[property] == 'function'; | |
| }); | |
| } | |
| console.log(getAllMethods(String).sort()); |