Skip to content

Instantly share code, notes, and snippets.

<script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script>
<h1 style="font-family: Helvetica Neue, Helvetica, Arial, sans-serif; text-align: center; font-weight: 500; line-height: 1.1; font-size: 30px; color: rgb(51,51,51);">ZIRC Cam 1</h1>
<video id="video" style="width:100%;"></video>
<button id="button1" style="display:none;">PLAY</button>
<script>
window.addEventListener("DOMContentLoaded", function() {
var videoSource = '/stream/camera1.m3u8';
var video = document.getElementById('video');
var button = document.getElementById('button1');
//button.addEventListener('click', () => { console.log("clicked the video"); video.play(); });
#!/bin/bash
cameraName=$1
cameraUrl=$2
function usage {
echo "Usage: $0 <cameraName> <rtsp://cameraUrl>"
exit 1
}
@JakeWharton
JakeWharton / OkHttpStack.java
Created May 21, 2013 01:14
A `HttpStack` implementation for Volley that uses OkHttp as its transport.
import com.android.volley.toolbox.HurlStack;
import com.squareup.okhttp.OkHttpClient;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;
/**
* An {@link com.android.volley.toolbox.HttpStack HttpStack} implementation which
* uses OkHttp as its transport.
*/
@mislav
mislav / pagination.md
Created October 12, 2010 17:20
"Pagination 101" by Faruk Ateş

Pagination 101

Article by Faruk Ateş, [originally on KuraFire.net][original] which is currently down

One of the most commonly overlooked and under-refined elements of a website is its pagination controls. In many cases, these are treated as an afterthought. I rarely come across a website that has decent pagination, and it always makes me wonder why so few manage to get it right. After all, I'd say that pagination is pretty easy to get right. Alas, that doesn't seem the case, so after encouragement from Chris Messina on Flickr I decided to write my Pagination 101, hopefully it'll give you some clues as to what makes good pagination.

Before going into analyzing good and bad pagination, I want to explain just what I consider to be pagination: Pagination is any kind of control system that lets the user browse through pages of search results, archives, or any other kind of continued content. Search results are the o