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.
I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.
I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.
Chrome 51 has some pretty wild behaviour related to console.log
in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.
/** | |
* Loads an HTML document from a URL and retuns an element selected using | |
* the 'selector' parameter | |
* Example usage: | |
* loadPageSection('./myPage.html', '#container', (r, err) => console.log(r, err)); | |
* | |
* @method loadPageSection | |
* @param {String} url | |
* @param {String} selector - A valid CSS selector | |
* @param {Function} callback - To be called with two parameters (response, error) |
<?php | |
$date = date("Y-m-d"); | |
try { | |
$soap = new soapclient("https://www.superfinanciera.gov.co/SuperfinancieraWebServiceTRM/TCRMServicesWebService/TCRMServicesWebService?WSDL", array( | |
'soap_version' => SOAP_1_1, | |
'trace' => 1, | |
"location" => "http://www.superfinanciera.gov.co/SuperfinancieraWebServiceTRM/TCRMServicesWebService/TCRMServicesWebService", | |
)); |
by Bjørn Friese
Beautiful is better than ugly. Explicit is better than implicit.
I frequently deal with collections of things in the programs I write. Collections of droids, jedis, planets, lightsabers, starfighters, etc. When programming in Python, these collections of things are usually represented as lists, sets and dictionaries. Oftentimes, what I want to do with collections is to transform them in various ways. Comprehensions is a powerful syntax for doing just that. I use them extensively, and it's one of the things that keep me coming back to Python. Let me show you a few examples of the incredible usefulness of comprehensions.
/** | |
* Check if localStorage is supported const isSupported: boolean | |
* Check if localStorage has an Item function hasItem(key: string): boolean | |
* Get the amount of space left in localStorage function getRemainingSpace(): number | |
* Get the maximum amount of space in localStorage function getMaximumSpace(): number | |
* Get the used space in localStorage function getUsedSpace(): number | |
* Backup Assosiative Array interface Backup | |
* Get a Backup of localStorage function getBackup(): Backup | |
* Apply a Backup to localStorage function applyBackup(backup: Backup, fClear: boolean = true, fOverwriteExisting: boolean = true) | |
* Dump all information of localStorage in the console function consoleInfo(fShowMaximumSize: boolean = false) |
set-option -g status-utf8 on | |
set -g status-interval 1 | |
set -g status-justify left # center align window list | |
set -g status-left-length 75 | |
set -g status-right-length 150 | |
set -g status-fg white | |
set -g status-bg black | |
set -g status-attr bright |
Magic words:
psql -U postgres
Some interesting flags (to see all, use -h
or --help
depending on your psql version):
-E
: will describe the underlaying queries of the\
commands (cool for learning!)-l
: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
- Related Setup: https://gist.github.com/hofmannsven/6814278
- Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
- Interactive Beginners Tutorial: http://try.github.io/
- Git Cheatsheet by GitHub: https://services.github.com/on-demand/downloads/github-git-cheat-sheet/
Press minus + shift + s
and return
to chop/fold long lines!