First some administrative stuff! Before you start you will need to supply the following:
- Team Members
- Project Description
- Tech stack (and short reason why)
- Project Name
- Preferences for mentor (if any)
| #!/bin/sh | |
| start=`date +%s` | |
| bold=$(tput bold) | |
| normal=$(tput sgr0) | |
| red=`tput setaf 1` | |
| green=`tput setaf 2` | |
| reset=`tput sgr0` |
| // bracket pair colorizer | |
| const arrayOfNames = ["martin", "scott", "craig", "maya"]; | |
| arrayOfNames.forEach(function(names) { | |
| console.log(names) | |
| }) | |
| for (let name of arrayOfNames) { | |
| console.log(name); | |
| } |
| function Person(firstName, lastName, hairColor, heightInCm, favouriteAnimal = 'dog') { | |
| this.firstName = firstName | |
| this.lastName = lastName | |
| this.hairColor = hairColor | |
| this.heightInCm = heightInCm | |
| this.heightInInches = function() { | |
| return this.heightInCm / 2.54 | |
| } | |
| this.pets = [] | |
| this.favouriteAnimal = favouriteAnimal |
| // Option 1: Math.min() | |
| const findSmallestIntUsingMathMin = args => { | |
| return Math.min(...args); | |
| }; | |
| console.log(findSmallestIntUsingMathMin([1, 2, 3, 4, 0, 5])); | |
| // Option 2: Array.reduce() | |
| const reducer = (minValue, currentValue) => | |
| minValue < currentValue ? minValue : currentValue; |
| // bracket pair colorizer | |
| const arrayOfNames = ["martin", "scott", "craig", "maya"]; | |
| arrayOfNames.forEach(function(names) { | |
| console.log(names) | |
| }) | |
| for (let name of arrayOfNames) { | |
| console.log(name); | |
| } |
| const person = { | |
| firstName: 'Martin', | |
| lastName: 'Laws', | |
| heightInCm: 188, | |
| heightInInches: function() { | |
| return this.heightInCm / 2.54 | |
| }, | |
| speak() { | |
| console.log(`Hi, my name is ${this.firstName}!`) | |
| return |
| Array.prototype | |
| .slice.apply(document.querySelectorAll('.Box-row')) | |
| .forEach(el => { | |
| const org = el.querySelector('a[href^="/YOUR_ORG"]'); | |
| if (org) el.querySelector('button[value="included"]').click() | |
| }); | |
| var xpath = "//a[text()='Next']"; | |
| var matchingElement = document.evaluate(xpath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; | |
| matchingElement.click(); |
| # Lines configured by zsh-newuser-install | |
| HISTFILE=~/.histfile | |
| HISTSIZE=100000 | |
| SAVEHIST=100000 | |
| bindkey -v | |
| # End of lines configured by zsh-newuser-install | |
| # The following lines were added by compinstall | |
| zstyle :compinstall filename '/Users/martin/.zshrc' | |
| autoload -Uz compinit |