Skip to content

Instantly share code, notes, and snippets.

@donluismx
donluismx / stop-video.js
Created December 7, 2022 17:26 — forked from cferdinandi/stop-video.js
A simple method to stop YouTube, Vimeo, and HTML5 videos from playing.
/**
* Stop an iframe or HTML5 <video> from playing
* @param {Element} element The element that contains the video
*/
var stopVideo = function ( element ) {
var iframe = element.querySelector( 'iframe');
var video = element.querySelector( 'video' );
if ( iframe ) {
var iframeSrc = iframe.src;
iframe.src = iframeSrc;
@donluismx
donluismx / elasticsearch-snapshot-restore.md
Created August 17, 2017 14:32 — forked from lucidlibrary/elasticsearch-snapshot-restore.md
Elasticsearch Snapshot and Restore API

Elasticsearch introduced Snapshot and Restore API in Elasticsearch 1.0. With this module you can take backup/restore of the data easily.

To take snapshots or to restore them, first you need to create a repository. A repository is a just like allocating an address to your snapshots.

A repository can contain as many snapshots as you would like, and you can create any number of repositories.

Each repository is mapped to a location where your snapshot files will be stored. Elasticsearch first started with snapshots to FileSystem location, now you can take snapshots to Remove locations like AWS S3 directly.

Elasticsearch currently supports snapshtos to AWS S3,