jenkins_url
+ /api/json?tree=jobs[name,color]
jenkins_url
+ /job/${job_name}/api/json?tree=builds[number,status,timestamp,id,result]
Because pointers can be ugh
To understand a pointer, let's review "regular" variables first. If you're familiar with a programming language without pointers like JavaScript, this is what you think when you hear "variable".
When declaring a variable by identifier (or name), the variable is synonymous with its value.
Short excursion into git --track
, --set-upstream
and --set-upstream-to
.
All examples use the aliases co
for checkout
and br
for branch
.
Setup:
$ git clone git@github.com:AKSW/OntoWiki.git
Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
Commit type | Emoji |
---|---|
Initial commit | 🎉 :tada: |
Version tag | 🔖 :bookmark: |
New feature | ✨ :sparkles: |
Bugfix | 🐛 :bug: |
// Remove Duplicates from an array | |
const removeDuplicates = | |
arr => arr.filter((item, index) => index === arr.indexOf(item)); | |
const removeDuplicates1 = array => [...new Set(array)]; | |
const removeDuplicates2 = array => Array.from(new Set(array)); | |
// Flattens an array(doesn't flatten deeply). |
[alias] | |
co = checkout | |
cob = checkout -b | |
coo = !git fetch && git checkout | |
br = branch | |
brd = branch -d | |
brD = branch -D | |
merged = branch --merged | |
dmerged = "git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d" | |
st = status |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent
elem.clientLeft
, elem.clientTop
, elem.clientWidth
, elem.clientHeight
elem.getClientRects()
, elem.getBoundingClientRect()
// https://github.com/npm/npm/blob/master/lib/utils/parse-json.js | |
'use strict' | |
var parseJSON = module.exports = function (content) { | |
return JSON.parse(stripBOM(content)) | |
} | |
parseJSON.noExceptions = function (content) { | |
try { |
const puppeteer = require('puppeteer'); | |
(async () => { | |
const browser = await puppeteer.launch(); | |
const page = await browser.newPage(); | |
// Adjustments particular to this page to ensure we hit desktop breakpoint. | |
page.setViewport({width: 1000, height: 600, deviceScaleFactor: 1}); | |
await page.goto('https://www.chromestatus.com/samples', {waitUntil: 'networkidle'}); |
.wrapper{ | |
width: 550px; | |
text-align: justify; | |
background: firebrick; | |
font-size: 0; | |
font-size: 12px\9; /* IE6-9 only hack */ | |
} | |
.wrapper div{ | |
background: white; |