You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the jumble solver challenge as levied by a company. The goal is to accept a string of letters and return all possible words that can be made from any combination of those letters, including smaller words. Thus; gdo can be dog, god, do, and go.
The following is the notes I took years ago on the book Ultralearning by Scott Young. The bombastic title and promise to learn virtually anything quickly makes it sound as if its the typical marketing-powered fluff-filled nonfiction book stores are overflowing with, but something about this book stuck with me. After finishing it I quickly went back and wrote these thoughts down. While I don't follow his layout of plans regularly, I have used it to guide a lot of my own self education.
I've successfully utilized it when I needed to refresh on mathematics for my Master's degree (a host of skills that atrophied sigificantly for the dozen years between undergrad and the masters). I've also used it to self-study subjects like Robotics and Deep Learning (though I did decide in the end to go for the Master's accreditation).
I share it here with hopes that someone finds it useful.
Network testing a Docker Container with pumba + tc
Alright, so you want to test how your application fares with questionable network reliability. If you can get your application running in a docker container, this write-up will have you covered.
We're going to utilize linux's tc to control the outbound network connection. There's no easy way to do inbound yet. From that we'll be able to throttle and drop packets outbound which should give you a fair test of unreliable networks.
Dockerfile
This dockerfile utilizes the ubuntu image which was necessary for my purposes, but can be generalized to other docker imagers as per your use case.
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
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
node.js fs module was originally designed to copy linux's standard way of handling files. This means for deleteing files using the unlink functionality. For Windows, however, unlink operates differently - differently enough that I encountered several issues with unlink.
Why on Windows? Electron, mostly - I needed to handle a file post-creation via a child_process (in this case, a terminal execution of ffmpeg).
Windows unlink works by using ZwSetInformation (a low level Windows API/function) to set a file property DeleteFile to TRUE. Windows will then eventually, once the file is no longer being accessed by any process "delete" the file in whatever way it is wont to do (Recycle Bin versus full delete, etc). However, even if a child process created the file, it seems that the file can possibly be linked back to the parent process, preventing the parent process from ever actually deleting the file.
Even if the unlink process fires correctly, if Windows believes the file is stil
Recording video with ffmpeg w/ node on Windows - record for T seconds, get all recording devices (parsed), and add an overlay
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
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
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
How to build node-serialport on windows for an NW app.
Recently, I succeeded in building node-serialport for a windows NW app. This proved quite problematic, and I have decided to write down necessary steps to get it to run.
First, I would like to point out an excellent article written by the writer/maintainer of node-serialport highlighting why it is extremely difficult to keep node-serialport compatible with all the different node runtimes. Read it and appreciate the effort VoodooTikiGod puts in for us.
Before any action is taken, you need to install all pre-reqs for building with node-gyp native C/C++ modules. The most concise set of instructions that always works I've found is here.
The default build instructions for building native modules for an nw-app are here. The instructions I use, specifically, are: