Skip to content

Instantly share code, notes, and snippets.

View lqs469's full-sized avatar
🎃

Allen lqs469

🎃
View GitHub Profile
@lqs469
lqs469 / XmasHat.html
Created December 25, 2017 08:13
give your a Chirstmas hat
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='UTF-8'>
<meta name='viewport' content='width=device-width,maximum-scale=1.0,minimum-scale=1.0'>
<meta http-equiv='X-UA-Compatible' content='ie=edge'>
<title>X'mas Hat</title>
<style>
body {
font-size: 20px;
@lqs469
lqs469 / hls.html
Last active October 26, 2023 20:22
(.m3u8)Play the HLS(Http Live Stream) by hls.js
<script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script>
<!-- Or if you want a more recent canary version -->
<!-- <script src="https://cdn.jsdelivr.net/npm/hls.js@canary"></script> -->
<video id="video"></video>
<script>
const src = 'https://video.twimg.com/amplify_video/1158708708068745216/pl/480x480/XwDJBf-F7tIeXR9O.m3u8';
var video = document.getElementById('video');
if(Hls.isSupported()) {
var hls = new Hls();
hls.loadSource(src);
const React = {
createElement(tag, props, ...children) {
if (typeof tag === 'function') {
try {
return tag(props);
} catch ({ promise, key }) {
promise.then((data) => {
console.log('catch', data, key);
fetchCache.set(key, data);
rerender();
class State {
constructor(display, actors) {
this.display = display;
this.actors = actors;
}
update(time) {
/**
* provide an update ID to let actors update other actors only once
@lqs469
lqs469 / editor.html
Created October 27, 2020 03:37 — forked from zserge/editor.html
<!DOCTYPE html>
<html>
<head>
<style>
.editor { font-family: 'Roboto Mono', monospace; font-size: 12px; outline: none; overflow-y: auto; padding-left: 48px; counter-reset: line; }
.editor div { display: block; position: relative; white-space: pre-wrap; }
.editor div::before { content: counter(line); counter-increment: line; position: absolute; right: calc(100% + 16px); opacity: 0.5; }
</style>
</head>
@lqs469
lqs469 / feed.html
Last active March 11, 2021 17:16
feed.html
<!DOCTYPE html>
<style>
body {
margin: 0;
}
iframe {
display: block;
overflow: hidden;
margin: 0 auto;