Install homebrew/services, this will be helpful, you'll see later. :D
$ brew tap homebrew/services | No 'Access-Control-Allow-Origin' header is present on the requested resource | |
| Angular 2 | |
| chrome.exe --user-data-dir="C:/Chrome dev session" --disable-web-security |
| #!/bin/bash | |
| #Force file syncronization and lock writes | |
| mongo admin --eval "printjson(db.fsyncLock())" | |
| MONGODUMP_PATH="/usr/bin/mongodump" | |
| MONGO_HOST="prod.example.com" | |
| MONGO_PORT="27017" | |
| MONGO_DATABASE="dbname" | |
| function extend(base) { | |
| var parts = Array.prototype.slice.call(arguments, 1); | |
| parts.forEach(function (p) { | |
| if (p && typeof (p) === 'object') { | |
| for (var k in p) { | |
| if (p.hasOwnProperty(k)) { | |
| base[k] = p[k]; | |
| } | |
| } | |
| } |
| /** | |
| * Example to refresh tokens using https://github.com/auth0/node-jsonwebtoken | |
| * It was requested to be introduced at as part of the jsonwebtoken library, | |
| * since we feel it does not add too much value but it will add code to mantain | |
| * we won't include it. | |
| * | |
| * I create this gist just to help those who want to auto-refresh JWTs. | |
| */ | |
| const jwt = require('jwt'); |
| var restify = require('restify'); | |
| // Authentication | |
| var passport = require('passport'); | |
| var LocalStrategy = require('passport-local').Strategy; | |
| var sessions = require("client-sessions"); | |
| var server = restify.createServer(); | |
| server.use(restify.queryParser()); | |
| server.use(restify.bodyParser()); |
| // Modified from http://automationwiki.com/index.php?title=CRC-16-CCITT | |
| var crcTable = [0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50a5, | |
| 0x60c6, 0x70e7, 0x8108, 0x9129, 0xa14a, 0xb16b, | |
| 0xc18c, 0xd1ad, 0xe1ce, 0xf1ef, 0x1231, 0x0210, | |
| 0x3273, 0x2252, 0x52b5, 0x4294, 0x72f7, 0x62d6, | |
| 0x9339, 0x8318, 0xb37b, 0xa35a, 0xd3bd, 0xc39c, | |
| 0xf3ff, 0xe3de, 0x2462, 0x3443, 0x0420, 0x1401, | |
| 0x64e6, 0x74c7, 0x44a4, 0x5485, 0xa56a, 0xb54b, | |
| 0x8528, 0x9509, 0xe5ee, 0xf5cf, 0xc5ac, 0xd58d, |
| #!/bin/bash | |
| # usage: `curl --silent --location https://gist.githubusercontent.com/moshest/32b19e146bc5e1665708c885e535a631/raw/install.sh | bash -` | |
| set -e | |
| yum -y update | |
| AWS_REGION=`curl http://169.254.169.254/latest/dynamic/instance-identity/document|grep region|awk -F\" '{print $4}'` | |
| echo AWS Region: $AWS_REGION | |
| # install CodeDeploy |
| version: 0.0 | |
| os: linux | |
| files: | |
| - source: / | |
| destination: /home/ec2-user/node | |
| permissions: | |
| - object: /home/ec2-user | |
| owner: ec2-user | |
| group: ec2-user | |
| type: |
Brought to you by Headjack
FFmpeg is one of the most powerful tools for video transcoding and manipulation, but it's fairly complex and confusing to use. That's why I decided to create this cheat sheet which shows some of the most often used commands.
Let's start with some basics:
ffmpeg calls the FFmpeg application in the command line window, could also be the full path to the FFmpeg binary or .exe file