- Create non-root user for SSH and running node (https://www.digitalocean.com/community/tutorials/how-to-add-and-delete-users-on-an-ubuntu-14-04-vps)
- Run node on port 3000 instead of 80
Change the
listen(80)
portion of the script.js file tolisten(3000)
. - Install nginx and use as proxy to port 3000
- Install "forever" node module.
- Create @restart cron job for forever
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
sudo apt-get update | |
sudo apt-get install git -y | |
cd ~ | |
wget https://nodejs.org/dist/v4.3.2/node-v4.3.2-linux-x64.tar.xz | |
mkdir node | |
tar xvf node-v4.3.2-linux-x64.tar.xz --strip-components=1 -C ./node | |
cd ~ | |
rm -rf node-v* | |
mkdir node/etc | |
echo 'prefix=/usr/local' > node/etc/npmrc |
Crazy regex for matching acceptable video inputs for AWS Elemental MediaConvert:
I got the error trying to convert a gif image.
BadRequestException: /inputs/0/fileInput: Should match the pattern:
/^(s3://)([^/]+/)+([^/\.]+|(([^/]*)\.([mM]2[vV]|[mM][pP][eE][gG]|[aA][vV][iI]|[mM][pP]4|[fF][lL][vV]|[mM][pP][tT]|[mM][pP][gG]|[mM]4[vV]|[tT][rR][pP]|[fF]4[vV]|[mM]2[tT][sS]|[tT][sS]|264|[hH]264|[mM][kK][vV]|[mM][oO][vV]|[mM][tT][sS]|[mM]2[tT]|[wW][mM][vV]|[aA][sS][fF]|[vV][oO][bB]|3[gG][pP]|3[gG][pP][pP]|[mM][xX][fF]|[dD][iI][vV][xX]|[xX][vV][iI][dD]|[rR][aA][wW]|[dD][vV]|[gG][xX][fF]|[mM]1[vV]|3[gG]2|[vV][mM][fF]|[mM]3[uU]8|[lL][cC][hH]|[gG][xX][fF]_[mM][pP][eE][gG]2|[mM][xX][fF]_[mM][pP][eE][gG]2|[mM][xX][fF][hH][dD]|[wW][aA][vV]|[yY]4[mM])))$/
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
1080p Long Videos | |
x264 | |
Format: mkv | |
RF: 29 | |
Preset: slower | |
Tune: film | |
Profile: high | |
Level: 4.0 | |
Audio Codec: aac |
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
#regex pattern | |
/(frame)=\s*(\d+)|(fps)=\s*(\d+)|(fps)=\s*(\d+)|(time)\s*=(\d+:\d+:\d+\.\d+)|(size)=\s*(\d+)([a-z]+)|(bitrate)=\s*([\d\.]+)([a-z\/]+)|(speed)=\s*([\dx]+)/mgi | |
#javascript | |
var regexp = /(frame)=\s*(\d+)|(fps)=\s*(\d+)|(fps)=\s*(\d+)|(time)\s*=(\d+:\d+:\d+\.\d+)|(size)=\s*(\d+)([a-z]+)|(bitrate)=\s*([\d\.]+)([a-z\/]+)|(speed)=\s*([\dx]+)/mgi; |
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
window._fs__hbo_timeout; | |
window._fs__hbo = function(){ | |
document.querySelector("#ifp").parentNode.setAttribute("style", "position:fixed;top:0px;left:0px;width:100vw;height:100vh;background-color:#000;z-index:2147483648;"); | |
document.querySelector("#ifp").parentNode.setAttribute("id", "flvideo"); | |
document.querySelector("#ifp").parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.style.top = "0px"; | |
document.querySelectorAll(".default").forEach(function(e){ | |
var style = window.getComputedStyle(e); | |
if(e.getAttribute("id") != "flvideo" && style.position == "fixed"){ e.style.opacity = 0; e.style.zIndex = 1; } | |
}); | |
} |
- Turn on holding reset button with paperclip.
- Press
Ctl-D
at recovery screen. - Press reset button again with paperclip. (Should reboot)
- ... Wait for 2 beeps (It will take a min.) After beeps. Wait for developer mode to install. (~5-10 min)
http://www.itea.dk/index.php/2017/01/06/wipe-clear-reset-a-chromebit/
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
#!/bin/sh | |
ffmpeg \ | |
-i "http://relay.publicdomainradio.org/classical.mp3" \ | |
-f lavfi \ | |
-re \ | |
-i testsrc=duration=120:size=1280x720:rate=24 \ | |
-map 0:0 \ | |
-map 1:0 \ | |
-c:v libx264 \ |
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
#!/bin/bash | |
BUILD_ID=$(date +"%s") | |
SRC_DIR="MyApp" | |
ZIP_FILE="dist/devbuild_$BUILD_ID.zip" | |
ROKU_URL="http://192.168.1.167" | |
ROKU_DEV_USER="rokudev" | |
ROKU_DEV_PW="******" |
OlderNewer