- optimize with faststart (for mobile web)
- crf (quality) goes from 0 (lossless) - 50 (very poor).
ffmpeg -i input.mp4 -crf 30 -profile:v baseline -level 3.0 -movflags +faststart -an output.mp4
//////////////////////////////////////////////////////////////////////////////// | |
for ( var everything in large.amounts ) { | |
count++; | |
} | |
//////////////////////////////////////////////////////////////////////////////// | |
monday.rgb = 0x0000ff; |
Simple guide for setting up OTG modes on the Raspberry Pi Zero - By Andrew Mulholland (gbaman).
The Raspberry Pi Zero (and model A and A+) support USB On The Go, given the processor is connected directly to the USB port, unlike on the B, B+ or Pi 2 B, which goes via a USB hub.
Because of this, if setup to, the Pi can act as a USB slave instead, providing virtual serial (a terminal), virtual ethernet, virtual mass storage device (pendrive) or even other virtual devices like HID, MIDI, or act as a virtual webcam!
It is important to note that, although the model A and A+ can support being a USB slave, they are missing the ID pin (is tied to ground internally) so are unable to dynamically switch between USB master/slave mode. As such, they default to USB master mode. There is no easy way to change this right now.
It is also important to note, that a USB to UART serial adapter is not needed for any of these guides, as may be documented elsewhere across the int
# Plain Ol' Node | |
node --max-old-space-size=1024 app.js # increase to 1gb | |
node --max-old-space-size=2048 app.js # increase to 2gb | |
node --max-old-space-size=3072 app.js # increase to 3gb | |
node --max-old-space-size=4096 app.js # increase to 4gb | |
node --max-old-space-size=5120 app.js # increase to 5gb | |
node --max-old-space-size=6144 app.js # increase to 6gb | |
# For pm2 | |
pm2 start app.js --node-args="--max-old-space-size=1024" # increase to 1gb |
#!/bin/bash -xe | |
# Unload nouveau | |
sudo rmmod nouveau | |
# Load nvidia | |
sudo modprobe nvidia | |
# Configure X | |
sudo nvidia-xconfig --use-display-device=None --virtual=1280x1024 --output-xconfig=/etc/X11/xorg.conf --busid=PCI:0:3:0 --enable-all-gpus |
{ | |
// http://eslint.org/docs/rules/ | |
"ecmaFeatures": { | |
"binaryLiterals": false, // enable binary literals | |
"blockBindings": false, // enable let and const (aka block bindings) | |
"defaultParams": false, // enable default function parameters | |
"forOf": false, // enable for-of loops | |
"generators": false, // enable generators | |
"objectLiteralComputedProperties": false, // enable computed object literal property names |
sudo apt-get install python-software-properties | |
sudo apt-get install software-properties-common | |
sudo add-apt-repository ppa:rwky/graphicsmagick | |
sudo apt-get update | |
sudo apt-get install graphicsmagick |
These steps walk through installing a static binary of any ffmpeg version on to your linux machine. If you want to compile from source, there are several ways to do so. Here's the official guide. Tested and works on an AWS EC2 Ubuntu instance, but should work on any Linux machine.
.pem
file downloaded from AWS$ chmod 0600 ~/Downloads/{your_key}.pem