Skip to content

Instantly share code, notes, and snippets.

@Meai1
Meai1 / ffmpeg-dash.html
Created April 27, 2020 11:20 — forked from CharlesHolbrow/ffmpeg-dash.html
Simple example of using live streaming audio video with dash.js and ffmpeg
<!DOCTYPE html>
<html lang='`en'>
<head>
<meta charset='utf-8'/>
<title>Audio only stream example</title>
<script src='https://cdn.dashjs.org/latest/dash.all.min.js'></script>
<style>
video {
@Meai1
Meai1 / install.sh
Created February 15, 2019 07:33 — forked from patrickbcullen/install.sh
Install PCP on Centos 7
# run these commands on a Centos 7 server as root
yum install -y pcp pcp-webapi pcp-system-tools
chkconfig pmcd on
service pmcd start
chkconfig pmlogger on
service pmlogger start
chkconfig pmwebd on
service pmwebd start
# open port 44323 in the firewall
# To start vector on your laptop
@Meai1
Meai1 / gist:0b5f59fa5203d463f73a345316ced584
Created August 18, 2018 15:49
cockroachdb jsonb sql update
CREATE TABLE users (
profile_id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
last_updated TIMESTAMP DEFAULT now(),
user_profile JSONB);
insert into users (user_profile) values ('{"first_name":"Patrick", "friends" : 888}');
update users SET user_profile = json_set(user_profile,ARRAY['first_name'],'"heyyy"')::jsonb where user_profile->'first_name' @> to_json('Patrick');
// FULL default record update, deleting all other fields:
@Meai1
Meai1 / gist:5c0a88c319f5ad2ed4775ee0e26fb05d
Created August 17, 2018 09:55
dartium launch workaround for "your dartium version has expired"
export DARTIUM_EXPIRATION_TIME=1577836800; ./chrome-wrapper
@Meai1
Meai1 / gist:1dce36bdfdf250467a7989efb4f75bc5
Last active August 17, 2018 04:28
coroutine explanation
//coroutine pseudo code explanation
<hio> Okay I think I understand now why it's so hard for me to grok this, there is no regular programming API for this. Right? Who is supposed to offer an API for this, is this supposed to come from the compiler, like GCC?
<hio> i think not, many people do create their own coroutine libraries so it's clearly not necessary to deal with the compiler
<hio> but there is a lack of programming api surface, like.. C doesnt expose this stuff right?
<hio> or is it the OS that doesnt expose it properly?
<hio> I think it is probably the OS in combination with the system C library that should be offering an API to interact with the current stackframes etc. right?
<hio> I feel like this isnt even a "low level" problem necessarily, you just need to get some reflection type access in your language and C/c++ dont have that so it's awkward and weirdly complex, like here c# actually allows access to stackframes: https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.stackframe?redire
library petitparser.core.actions.action;
import 'package:dart_server_test/src/core/combinators/delegate.dart';
import 'package:dart_server_test/src/core/contexts/context.dart';
import 'package:dart_server_test/src/core/contexts/result.dart';
import 'package:dart_server_test/src/core/parser.dart';
/// Typed action callback.
typedef R ActionCallback<T, R>(T value);
class Animal {
Animal() {
_render();
}
_render() {}
}
class Dog extends Animal {
Dog() {}
@Meai1
Meai1 / gist:5d49e68a6524b2e558cc9edbc2950f6c
Last active August 18, 2018 05:54
custom gcc export vars for use
export LD_LIBRARY_PATH=/usr/local/lib64:/usr/local/lib
export CXX=/usr/local/bin/g++
export CC=/usr/local/bin/gcc
@JS()
library IncrementalDOM;
import 'dart:html';
import 'dart:async';
import 'package:js/js.dart';
@JS()
external void elementOpenStart(String nameOrCtor,
@Meai1
Meai1 / designer.html
Last active August 29, 2015 14:12
designer
<link rel="import" href="../chart-js/chart-js.html">
<link rel="import" href="../code-mirror/code-mirror.html">
<link rel="import" href="../paper-button/paper-button.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: static;