cd ~
wget http://nodejs.org/dist/v6.2.1/node-v6.2.1-linux-armv6l.tar.gz
tar -xzf node-v6.2.1-linux-armv6l.tar.gz
node-v6.2.1-linux-armv6l/bin/node -v
The last command should print v6.2.1.
Now you can copy it to /usr/local
// NOTE: only escapes a " if it's not already escaped | |
function escapeDoubleQuotes(str) { | |
return str.replace(/\\([\s\S])|(")/g,"\\$1$2"); // thanks @slevithan! | |
} | |
escapeDoubleQuotes(`ab`); // ab => ab (nothing escaped) | |
escapeDoubleQuotes(`a"b`); // a"b => a\"b | |
escapeDoubleQuotes(`a\\"b`); // a\"b => a\"b (nothing escaped) | |
escapeDoubleQuotes(`a\\\\"b`); // a\\"b => a\\\"b | |
escapeDoubleQuotes(`a\\\\\\"b`); // a\\\"b => a\\\"b (nothing escaped) |
#!/bin/bash | |
# Functions ============================================== | |
# return 1 if global command line program installed, else 0 | |
# example | |
# echo "node: $(program_is_installed node)" | |
function program_is_installed { | |
# set to 1 initially | |
local return_=1 |
The MIT License (MIT) | |
Copyright (c) 2015 Justin Perry | |
Permission is hereby granted, free of charge, to any person obtaining a copy of | |
this software and associated documentation files (the "Software"), to deal in | |
the Software without restriction, including without limitation the rights to | |
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | |
the Software, and to permit persons to whom the Software is furnished to do so, | |
subject to the following conditions: |
#!/usr/bin/env bash | |
# * https://developer.android.com/reference/android/view/KeyEvent#constants | |
# * https://developer.amazon.com/appsandservices/solutions/devices/fire-tv/docs/amazon-fire-tv-remote-input | |
# * ---------------------------------------------------------------------------------------------------- | |
# * | | (KEYCODE_MEDIA_RECORD) | | | |
# * ---------------------------------------------------------------------------------------------------- | |
# * | | | |
# * ---------------------------------------------------------------------------------------------------- | |
# * | | KEYCODE_DPAD_UP | | |