Skip to content

Instantly share code, notes, and snippets.

View ernestweems's full-sized avatar
💡

Ernest Weems ernestweems

💡
  • CDC + Personal Projects
  • Atlanta,Ga
View GitHub Profile
@ernestweems
ernestweems / .block
Last active June 24, 2020 14:56
Chart - Bar Chart starter
license: mit
@ernestweems
ernestweems / .block
Last active June 24, 2020 20:30
Interactive Small Multiples - Step 5
license: mit
@ernestweems
ernestweems / less.md
Created April 7, 2020 00:55 — forked from nnja/less.md
A cheatsheet for using less on the command line

Tips for using less on the command line.

To navigate:

  • f = for next page
  • b = for previous page

To search:

  • /<query>
@ernestweems
ernestweems / js-for-wp-setup.md
Created August 4, 2017 20:59 — forked from 1Marc/js-for-wp-setup.md
JS for WordPress Workshop Setup

What you need for the JavaScript for WordPress Workshop

Code Repository (frontend-masters-jsforwp)

  1. Setup a Local WP Environment using DesktopServer, Local or Chassis
  2. Running WordPress Site with Dummy Content
  3. Code Editor / IDE
  4. Node & NPM Running
  5. Get comfortable with JavaScript, webpack, command line

Participants should have a recent version of Node.js installed on their system (preferably the latest LTS version, which is 6.9.1 as of this writing—but anything from 0.10 on should work). Participants should clone the following repositories and run npm install in each of them prior to the start of the workshop.

Optional: It might be helpful to install Electron globally so that you can use it from the command line in case there are any issues with any of the dependencies in the project above. You can install this through npm install -g electron.

Finally, debugging the main process is easiest using Visual Studio Code, which is available for all platforms (Windows, Linux, and macOS). This is not a hard requirement, but helpful if you'd like to follow along for that small segment of the workshop.

//-- Sum --------------------------------------------------------------
let
identity = 0,
mappend = (x,y) => x + y, // +
concatSum =
xs => xs.reduce(mappend, identity)
concatSum([1,2,3,4,5]) // => 15
//-- Product ----------------------------------------------------------
<html><body><pre><script>
"use strict";
function log(arg) {
document.writeln(arg);
}
function identity(x) {
return x;
}
log(identity(3));