From currying to closures there are quite a number of special words used in JavaScript. These will not only help you increase your vocabulary but also better understand JavaScript. Special terms are normally found in documentation and technical articles. But some of them like closures are pretty standard things to know about. Knowing what the word itself means can help you know the concept it's named for better.
| // based on: | |
| // http://iamemmanouil.com/blog/electron-oauth-with-github/ | |
| // https://github.com/ekonstantinidis/gitify | |
| // this version uses https rather than superagent | |
| var querystring = require('querystring'); | |
| var https = require("https"); | |
| // Your GitHub Applications Credentials |
| //Now with less jquery | |
| //1) go to your my-list page, and scroll to the bottom to make sure it's all loaded: | |
| //http://www.netflix.com/browse/my-list | |
| //2) Next, paste this in your developer tools console and hit enter: | |
| [...document.querySelectorAll('.slider [aria-label]')].map(ele => ele.getAttribute('aria-label')) | |
| //or use this to copy the list to your clipboard: | |
| copy([...document.querySelectorAll('.slider [aria-label]')].map(ele => ele.getAttribute('aria-label'))) |
| var spawnSync = require('child_process').spawnSync; | |
| function hasSchedulingIntent(email) { | |
| // Convert email object into a one-line text similar to our fastText training samples. | |
| let text = email.textBody || email.strippedHtmlBody || ''; | |
| text = 'SUBJECT: ' + (email.subject || '') + ' ' + text; | |
| text = text.replace(/\n/g, ' '); | |
| // Call the fastText binary and return true or false depending on its output. | |
| var resp = spawnSync( |
This is about documenting getting Linux running on the late 2016 and mid 2017 MPB's; the focus is mostly on the MacBookPro13,3 and MacBookPro14,3 (15inch models), but I try to make it relevant and provide information for MacBookPro13,1, MacBookPro13,2, MacBookPro14,1, and MacBookPro14,2 (13inch models) too. I'm currently using Fedora 27, but most the things should be valid for other recent distros even if the details differ. The kernel version is 4.14.x (after latest update).
The state of linux on the MBP (with particular focus on MacBookPro13,2) is also being tracked on https://github.com/Dunedan/mbp-2016-linux . And for Ubuntu users there are a couple tutorials (here and here) focused on that distro and the MacBook.
Note: For those who have followed these instructions ealier, and in particular for those who have had problems with the custom DSDT, modifying the DSDT is not necessary anymore - se
| package main | |
| import ( | |
| "encoding/base64" | |
| "fmt" | |
| rand "math/rand" | |
| "time" | |
| "github.com/gin-gonic/gin" |
Note: This post is a summary of information paraphrased from an excellent blog post by Christian Sepulveda.
Create the app and download the necessary dependencies.
| import React, { Component, createContext } from 'react' | |
| function initStore(store) { | |
| const Context = createContext(); | |
| class Provider extends React.Component { | |
| constructor() { | |
| super(); | |
| this.state = store.initialState; | |
| } |
This content moved here: https://exploringjs.com/impatient-js/ch_arrays.html#quickref-arrays