{ | |
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"resources": [ | |
{ | |
"type": "Microsoft.KeyVault/vaults", | |
"name": "LoremVault", | |
"apiVersion": "2015-06-01", | |
"location": "[resourceGroup().location]", | |
"properties": { |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Youtue Stream Manager</title> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css"> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script> |
function updateTransition(transitionState){ | |
YouTube.setTokenService(function(){ return getYouTubeService().getAccessToken(); }); | |
var resp=YouTube.liveBroadcastsList("snippet,status", {id:videoId}); | |
return YouTube.liveBroadcastsTransition(transitionState, videoId, "status", {}); | |
} | |
function startLive(videoId){ | |
const transitionState="live"; | |
updateTransition(transitionState); | |
} |
function bind_broadcast(broadcast_id, stream_id){ | |
const bind_broadcast_response = YouTube.liveBroadcastsBind(broadcast_id,"id,contentDetails", {"streamId":stream_id}); | |
return bind_broadcast_response; | |
} |
function updateBroadcastMeta(videoId){ | |
var resp=YouTube.videosList("snippet,status",{id:videoId}); | |
resp[0].snippet["categoryId"]=27; | |
//It's mandatory to declare whether the video is made for the kids or not. | |
resp[0].status["madeForKids"]=false; | |
resp[0].status["selfDeclaredMadeForKids"]=false; | |
YouTube.videosUpdate("snippet,status",{id:videoId,snippet:resp[0].snippet,status:resp[0].status}, {}); | |
} |
function getStreamInfo(streamId){ | |
//var streamId="<your-fixed-stream-id>"; | |
YouTube.setTokenService(function(){ return getYouTubeService().getAccessToken(); }); | |
var resp=YouTube.liveStreamsList("snippet,cdn", {id:streamId}); | |
return stream_resources[0]; | |
} |
const streamId='<Get your stream Id>' | |
fuction scheduleEvent(){ | |
var actualString = Utilities.formatDate( | |
row.actual_date, | |
Session.getScriptTimeZone(), | |
"YYYY-MM-dd'T'HH:mm:ssZZZZZ" | |
); | |
actualString = actualString.replace('00:00:00+0530', '01:40:00.000Z'); |
const faker = require('faker') | |
// const N = 30 | |
const N = 2000000 | |
const fs = require('fs') | |
const record = () => { | |
// faker.fake( | |
// '{{name.lastName}},{{name.lastName}},{{address.city}},{{address.county}},{{address.zipCode}},{{hacker.adjective}}\n' | |
return [ | |
faker.name.firstName(), | |
faker.name.lastName(), |
So in the past, I've used MAMP/MAMP Pro apps and others alike. I've also, setup my own local MAMP stack with homebrew
, that used dnsmasq
to dynamically add vhosts anytime I added a new folder to the Sites
folder which made it very convenient. But, then I started running into other environment issues with PHP versions on remote machines/servers not being updated or some other crazy thingamabob breaking.
I researched and invested time in Vagrant, but that seem to break more often than my homebrew
setup. So I researched again investing time into Docker via Docker for Mac (which is BAMF), which I'm sold on and use daily, but it still seems a little bleeding edge and not so simple to wrap your head around the concept. Not to mention I don't have a real use case to play with and take advantage of all the features that come packed with Docker.
This is the beginning of trying to find something more simple, and slightly quicker to setup.