Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.
brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
Installing Arch: | |
sudo vim /etc/pacman.conf | |
Update packages list: sudo pacman -Syy | |
run sudo pacman -Syu before installing any software (to update the repositories first) | |
* Timing issue: | |
- Change hardware clock to use UTC time: | |
sudo timedatectl set-local-rtc 0 |
// Credit to @steobrien from https://gist.github.com/rmehner/b9a41d9f659c9b1c3340#gistcomment-2940034 | |
// for modern browsers, this works: | |
const dbs = await window.indexedDB.databases() | |
dbs.forEach(db => { window.indexedDB.deleteDatabase(db.name) }) | |
// for older browsers, have a look at previous revisions of this gist. |
# Install | |
# via http://askubuntu.com/questions/510056/how-to-install-google-chrome | |
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | |
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' | |
sudo apt-get update | |
sudo apt-get install google-chrome-stable | |
# Update |
var uniqueArray = function(arrArg) { | |
return arrArg.filter(function(elem, pos,arr) { | |
return arr.indexOf(elem) == pos; | |
}); | |
}; | |
var uniqEs6 = (arrArg) => { | |
return arrArg.filter((elem, pos, arr) => { | |
return arr.indexOf(elem) == pos; | |
}); |
Redux was developed to achieve hot reloading global state and state changing logic. To achieve that it was necessary for state changes to be run with pure functions and the state has to be immutable. Now you can change the logic inside your reducer and when the application reloads Redux will put it in its initial state and rerun all the actions again, now running with the new state changing logic.
Cerebral had no intention of achieving hot reloading. Cerebral was initially developed to give you insight into how your application changes its state, using a debugger. In the Redux debugger you see what actions are triggered and how your state looks after the action was handled. In Cerebral you see all actions fired as part of a signal. You see asynchronous behaviour, paths taken based on decisions made in your state changing flow. You see all inputs and outputs produced during the flow and you even
a = {b: 1, c:{ d:3 }} | |
z = Object.assign({}, a) | |
z.c.d = 4 | |
console.log(a.c.d) // 4 |
In this article, I will share some of my experience on installing NVIDIA driver and CUDA on Linux OS. Here I mainly use Ubuntu as example. Comments for CentOS/Fedora are also provided as much as I can.
JavaScript does not bother you too much with types (at first), which is both a blessing and a cure. But we all know the Boolean type. Boolean variables can either be true
or false
. Yes or no.
Every value in JavaScript can be translated into a boolean, true
or false
. Values that translate to true
are truthy, values that translate to false
are falsy. Simple.
This is about two ways to make that translation.