Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.
You've got two main options:
function fzf_jj_edit | |
if test -d .jj | |
set -l name (jj log --no-graph -T 'change_id.shortest() ++ "\t" ++ description.first_line() ++ " " ++ bookmarks.join(" ") ++ "\n"' --color always | fzf --ansi | cut -f1) | |
commandline -it "$name" | |
else | |
commandline -it "# not in a jj directory" | |
end | |
end | |
bind \cj 'fzf_jj_edit' |
// How do you avoid name clashes between functions, variables, components, and types? | |
// OK | |
const crocodiles = getCrocodiles({ color: 'green' }) | |
// ??? | |
const isCrocodile = isCrocodile(crocodiles[0]) | |
// OK | |
const user: User = { name: 'Chuck Norris' } |
#!/bin/bash | |
if ! command -v curl &> /dev/null; then | |
echo "This script needs curl. Please install curl." | |
exit -1 | |
fi | |
if ! command -v jq &> /dev/null; then | |
echo "This script needs jq. Please install jq." | |
exit -1 |
;; Boot to PRINT10 | |
;; | |
;; Use nasm to assemble the code to a binary: | |
;; | |
;; $ nasm -f bin -o boot.bin boot.nasm | |
;; | |
;; Use dd to make an empty floppy disk image: | |
;; | |
;; $ dd if=/dev/zero of=boot.flp ibs=1k count=1440 | |
;; |
What if... Virtual DOM... but by hand?
aha ha, just kidding...
unless.. ?
Microview is a tiny library for writing efficient data-driven DOM rendering logic by hand. DOM writes are driven by a pure data model. Using Microview, you can freely "bash the dom". Writes will be batched — they'll only happen once per animationframe, and only if the data model changes.
UPDATED 22.11.2022
It's been two years since the last update, so here's the updated working script as per the comments below.
Thanks to BryanHaley for this.
setInterval(function () {
video = document.getElementsByTagName('ytd-playlist-video-renderer')[0];
video.querySelector('#primary button[aria-label="Action menu"]').click();
I wanted to know: How can I get the current timestamp for UTC in ISO 8601 format to appear in the body data of a Postman request?
After reading some of the Postman documentation and online comments, this is the solution (using Postman v5.0.1 for Chrome 58.0.3029.110 on macOS 10.12.5) I used:
In the Builder, while editing a request, click the "Pre-request Script" heading below the URL field.
In the editor field that appears, enter this single line of JavaScript:
postman.setGlobalVariable('timestampUtcIso8601', (new Date()).toISOString());
// 🔥 Node 7.6 has async/await! Here is a quick run down on how async/await works | |
const axios = require('axios'); // promised based requests - like fetch() | |
function getCoffee() { | |
return new Promise(resolve => { | |
setTimeout(() => resolve('☕'), 2000); // it takes 2 seconds to make coffee | |
}); | |
} |