(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| const flattenTco = ([first, ...rest], accumulator) => | |
| (first === undefined) | |
| ? accumulator | |
| : (Array.isArray(first)) | |
| ? flattenTco([...first, ...rest]) | |
| : flattenTco(rest, accumulator.concat(first)) | |
| const flatten = (n) => flattenTco(n, []); | |
| console.log(flatten([[1,[2,[[3]]]],4,[5,[[[6]]]]])) |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| Running shell scripts that have contain sudo commands in them from jenkins might not run as expected. To fix this, follow along | |
| Simple steps: | |
| 1. On ubuntu based systems, run " $ sudo visudo " | |
| 2. this will open /etc/sudoers file. | |
| 3. If your jenkins user is already in that file, then modify to look like this: | |
| jenkins ALL=(ALL) NOPASSWD: ALL | |
| 4. save the file by doing Ctrl+O (dont save in tmp file. save in /etc/sudoers, confirm overwrite) | |
| 5. Exit by doing Ctrl+X | |
| 6. Relaunch your jenkins job |
To install tcptraceroute on Debian/Ubuntu:
$ wget http://linuxco.de/tcping/tcping-1.3.5.deb
$ sudo dpkg -i tcping-1.3.5.debTo install tcptraceroute on CentOS/REHL, first set up RepoForge on your system, and then:
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |