Skip to content

Instantly share code, notes, and snippets.

View jordicenzano's full-sized avatar
🤓
Working ... probably

Jordi Cenzano jordicenzano

🤓
Working ... probably
View GitHub Profile
@jordicenzano
jordicenzano / generate-aes128.sh
Created October 29, 2017 03:21
Bash script that generates an HLS encrypted (AES128 chunk) from MP4
#Generate HLS chunklist with AES128 chunk encryption file
#Source data
SOURCE="/Users/jcenzano/Movies/test10m_baseline_30_320x240_a25fpsB.mp4"
#Dest data
DEST="/Users/jcenzano/Movies/hls-encrypted/result-aes128"
KEYS_DIR="keys"
DEST_KEYS=$DEST"/"$KEYS_DIR
@jordicenzano
jordicenzano / dns-propagation-time-check.js
Created March 27, 2017 21:58
Get the DNS propagation time
#!/usr/bin/env node
const dns = require('dns');
const options = {
ttl: true
};
if (process.argv.length < 4) {
console.error("Usage dns-propagation-time-check.js domain ip_target");
@jordicenzano
jordicenzano / elemental-input-switch.js
Last active January 12, 2017 14:45
Elemental API: Switch from input A to Input B inside the same event
#!/usr/bin/env node
//Replace following vars:
var base_url = "http://ELEMENTAL-NAME.YOURDOMAIN.ccc";
var user_name = "PUT ELEMENTAL YOUR USERNAME";
var api_key = "PUT YOUR ELEMENTAL API KEY";
var ev_number = EV_NUMBER_TO_SW; //Example: 33
var input_name_to_switch = "INPUT NAME"; //The input's name on elemental. Example: slate
const child_process = require('child_process');