Skip to content

Instantly share code, notes, and snippets.

View askilondz's full-sized avatar

Andrew askilondz

  • Home
View GitHub Profile
askilondz / cloudSettings
Last active March 2, 2020 18:09
Visual Studio Code Settings Sync Gist
askilondz / gistlog.yml
Last active May 30, 2024 11:02
Adaptive Streaming with MPEG-DASH and HLS using AWS

Adaptive Streaming has become the neccessity for streaming video and audio. Unfortantely, as of this post, there isn't a whole lot of tutorials that accumulate all of the steps to get this working. Hopefully this post achieves that. This post focuses on using Amazon Web Services (AWS) to transcode for HLS and DASH and be the Content Delivery Network (CDN) that delivers the stream to your web page. We'll be using Video.js for the HTML5 player as well as javascript support libaries to make Video.js work with HLS and DASH.

So Here's what you need:

Set up three S3 buckets

askilondz / gistlog.yml
Last active April 11, 2016 16:34
Angular Translate and Using forceLanguage

I had a scenerio in my Ionic/Angular application where I wanted to translate only a certain block of text seperate from the rest of the text in my Application. Meaning I didn't want the whole app to translate itself when I translate said block of text. So how can this be done? A quick look into the documentation for $translate you'll notice a 4th optional parameter: forceLanguage.$translate

So instead of using $translate.use(key) (which would set the locale for my whole application) I used forceLanguage in a simple function. First I created my language dropdown:

<select id="shareSelect" ng-model="optionSelected" ng-change="onSelectLangChange(optionSelected)">
    <option value="default" ng-selected="selected">Select a Language</option>
askilondz / gistlog.yml
Last active April 11, 2016 16:38
Laravel Localization. A simple approach.

Localization is all the rage. Maybe that's a stretch...but it should be. I don't think there's any doubt of it's importance. It gives your site and content further ability to reach the entire connected world. Making that happen though is another story. Thankfully Laravel has a great localization class for this...but what's the best way to implement it?

I have site with two main localization objectives: detect the user's default browser language to know what language to display your content in...and provide a global dropdown giving the user the ability to translate your content on the fly.

So my config/languages.php I have an array for the languages I'm currently supporting:

    'available' => [
        'en' => 'English',
 'zh' =&gt; 'Chinese',