- I learned that using the git patch tool for commits may require splitting hunks manually. See this thread about "Sorry cannot split this hunk."
- To show the full diff of a stash in git, use
git stash show -p
. See this thread as well. - An interesting read on how the Source engine implements the Server-Client networking architecture. See this thread here.
- To fake lag (and to test prediction) in Half-Life, use the command
fakelag
to simulate the behavior one would experience with a less than ideal ping. - Windows 8 does not support running native windows docker containers. Support began with Server 2016 / Windows 10.
- An interesting docu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function* fibonacci() { | |
let [prev, curr] = [0, 1]; | |
while (true) { | |
yield curr; | |
[prev, curr] = [curr, prev + curr]; | |
} | |
} | |
for (let number of fibonacci()) { | |
console.log(number); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Iterative Fibonacci | |
// Shift values from z to x. | |
// x <- y <- z | |
// 0 <- 1 <- 1 | |
// 1 <- 1 <- 2 | |
// 1 <- 2 <- 3 | |
// 2 <- 3 <- 5 | |
// ... | |
const fibonacci = (seed) => { | |
let x = 0, y = 1, z, next = 0; |