Skip to content

Instantly share code, notes, and snippets.

View randallb's full-sized avatar
🎬

Randall Bennett randallb

🎬
View GitHub Profile
https://le.utah.gov/~2018/bills/static/SB0065.html
(c) "Neglect" does not include:
310 (i) a parent or guardian legitimately practicing religious beliefs and who, for that
311 reason, does not provide specified medical treatment for a child;
312 (ii) a health care decision made for a child by the child's parent or guardian, unless the
313 state or other party to a proceeding shows, by clear and convincing evidence, that the health
314 care decision is not reasonable and informed;
315 (iii) a parent or guardian exercising the right described in Section 78A-6-301.5; or
316 (iv) permitting a child, whose basic needs are met and who is of sufficient age and
So on behalf of our users, I'd like to:
https://developers.google.com/youtube/v3/live/docs/liveBroadcasts/insert
which returns the live chat ID, and the broadcast ID, which I need to use in the next calls.
Then I'd like to continuously poll the api every few seconds for the live chats.
https://developers.google.com/youtube/v3/live/docs/liveChatMessages/list
# to get rid of tunnelss issue
# searchAndDestroy 443
searchAndDestroy() {
sudo lsof -n -i4TCP:$1 | grep LISTEN | awk '{print $2}' | xargs sudo kill -9
echo "Port" $1 "found and killed."
}
alias killTunnels="searchAndDestroy 443"
alias destroyAll="searchAndDestroy 443; searchAndDestroy 6379; searchAndDestroy 5000; searchAndDestroy 5100; searchAndDestroy 5200; searchAndDestroy 5300; searchAndDestroy 5400; "
// bad i think?
function currentUserStream () {
return Rx.Observable.create((o) => {
const fn = () => {
o.next(Math.random());
};
setInterval(fn, 250);
}).take(11).share();
}
@randallb
randallb / gist:f5c07af6136c15d691776aabfc3fd95a
Last active May 25, 2016 13:44
Some x.264 encoding params
8x8dct=1 aq-mode=2 bframes=1 chroma-qp-offset=1 colormatrix=smpte170m deblock=0:0 direct=auto ipratio=1.41 keyint=240 level=3.1 me=hex merange=16 min-keyint=auto mixed-refs=1 no-mbtree=0 partitions=i4x4,p8x8,b8x8 profile=high psy-rd=0.5:0.0 qcomp=0.6 qpmax=51 qpmin=10 qpstep=4 ratetol=10 rc-lookahead=30 ref=1 scenecut=40 subme=5 threads=0 trellis=2 weightb=1 weightp=2
@randallb
randallb / gist:5a08574f0d5db54b7d4c
Created October 15, 2015 18:57
Another kms 6 install
aptitude update
aptitude install libboost-all-dev
aptitude install libboost-all-dev librabbitmq1 libopencv-core2.4 libopencv-highgui2.4 opencv-data libglibmm-2.4-1c2a libvpx1 libsoup2.4-1 libelfg0 libcdparanoia0 libvisual-0.4-0 libegl1-mesa libegl1-x11 libwayland-client0 libwayland-egl1-mesa libwayland-egl1 libaa1 libavc1394-0 libcaca0 libcairo-gobject2 libdv4 libflac8 libgudev-1.0-0 libiec61883-0 libjack-jackd2-0 libjack-0.116 libshout3 libtag1c2a libwavpack1 libpulse0 liba52-0.7.4 libcdio13 libdvdread4 libmad0 libmpeg2-4 libopencore-amrnb0 libopencore-amrwb0 libsidplay1 libtwolame0 libavresample2 libopenjpeg5 libhogweed2 libvo-aacenc0 libvo-amrwbenc0 libgme0 libkate1 libmimic0 libmjpegutils-2.1-0 libmms0 libmodplug1 libmpeg2encpp-2.1-0 libmpg123-0 libass4 libbs2b0 libchromaprint0 libdca0 libfaad2 libflite1 libfluidsynth1 libgme0 libkate1 libmimic0 libmjpegutils-2.1-0 libmms0 libmodplug1 libmpeg2encpp-2.1-0 libmpg123-0 librsvg2-2 libsbc1 libsoundtouch0 libspandsp2 libwebp5 libwildmidi1 libzbar0 libgupnp-i
@randallb
randallb / gist:03481e6281baf4b9e911
Last active October 13, 2015 14:17
Install kms 6 (probably)
aptitude update
aptitude install libboost-all-dev
aptitude install libboost-all-dev librabbitmq1 libopencv-core2.4 libopencv-highgui2.4 opencv-data libglibmm-2.4-1c2a libvpx1 libsoup2.4-1 libelfg0 libcdparanoia0 libvisual-0.4-0 libegl1-mesa libegl1-x11 libwayland-client0 libwayland-egl1-mesa libwayland-egl1 libaa1 libavc1394-0 libcaca0 libcairo-gobject2 libdv4 libflac8 libgudev-1.0-0 libiec61883-0 libjack-jackd2-0 libjack-0.116 libshout3 libtag1c2a libwavpack1 libpulse0 liba52-0.7.4 libcdio13 libdvdread4 libmad0 libmpeg2-4 libopencore-amrnb0 libopencore-amrwb0 libsidplay1 libtwolame0 libavresample2 libopenjpeg5 libhogweed2 libvo-aacenc0 libvo-amrwbenc0 libgme0 libkate1 libmimic0 libmjpegutils-2.1-0 libmms0 libmodplug1 libmpeg2encpp-2.1-0 libmpg123-0 libass4 libbs2b0 libchromaprint0 libdca0 libfaad2 libflite1 libfluidsynth1 libgme0 libkate1 libmimic0 libmjpegutils-2.1-0 libmms0 libmodplug1 libmpeg2encpp-2.1-0 libmpg123-0 librsvg2-2 libsbc1 libsoundtouch0 libspandsp2 libwebp5 libwildmidi1 libzbar0 libgupnp-i
2015-10-09 18:43:54,379559 00000x574d [0x00007f638d0b9880] debug KurentoMediaServer main.cpp:188 main() Dumping logs to /var/log/kurento-media-server
2015-10-09 18:43:54,379897 00000x574d [0x00007f638d0b9880] info KurentoModuleManager ModuleManager.cpp:129 loadModules() Looking for modules in /usr/lib/x86_64-linux-gnu/kurento/modules
2015-10-09 18:43:54,380357 00000x574d [0x00007f638d0b9880] debug KurentoModuleManager ModuleManager.cpp:85 loadModule() Module loaded from /usr/lib/x86_64-linux-gnu/kurento/modules/libkmscoremodule.so
2015-10-09 18:43:54,380414 00000x574d [0x00007f638d0b9880] info KurentoModuleManager ModuleManager.cpp:108 loadModule() Loaded core version 6.0.0~327.ge157a04
2015-10-09 18:43:54,383783 00000x574d [0x00007f638d0b9880] debug KurentoModuleManager ModuleManager.cpp:85 loadModule() Module loaded from /usr/lib/x86_64-linux-gnu/kurento/modules/libkmselementsmodule.so
2015-10-09 18:43:54,383852 00000x574d [0x00007f638d0b9880] info KurentoModul
aptitude update
aptitude install libboost-all-dev
aptitude install libboost-all-dev librabbitmq1 libopencv-core2.4 libopencv-highgui2.4 opencv-data libglibmm-2.4-1c2a libvpx1 libsoup2.4-1 libelfg0 libcdparanoia0 libvisual-0.4-0 libegl1-mesa libegl1-x11 libwayland-client0 libwayland-egl1-mesa libwayland-egl1 libaa1 libavc1394-0 libcaca0 libcairo-gobject2 libdv4 libflac8 libgudev-1.0-0 libiec61883-0 libjack-jackd2-0 libjack-0.116 libshout3 libtag1c2a libwavpack1 libpulse0 liba52-0.7.4 libcdio13 libdvdread4 libmad0 libmpeg2-4 libopencore-amrnb0 libopencore-amrwb0 libsidplay1 libtwolame0 libavresample2 libopenjpeg5 libhogweed2 libvo-aacenc0 libvo-amrwbenc0 libgme0 libkate1 libmimic0 libmjpegutils-2.1-0 libmms0 libmodplug1 libmpeg2encpp-2.1-0 libmpg123-0
# UNKNOWS libkmsnice
curl -O http://ubuntu.kurento.org/pool/main/k/kmsjsoncpp/kmsjsoncpp_1.6.3~20150525150221.37.g263929e.trusty_amd64.deb
dpkg -i kmsjsoncpp_1.6.3~20150525150221.37.g263929e.trusty_amd64.deb
0:00:00.017601690 7311 0x1f32580 ERROR GST_PLUGIN_LOADING gstplugin.c:811:_priv_gst_plugin_load_file_for_registry: GstPluginDesc for '/usr/lib/x86_64-linux-gnu/gstreamer-1.5/libgstasf.so' has invalid datetime '2015-09-18/created>'
0:00:00.056595566 7311 0x1f32580 ERROR GST_PLUGIN_LOADING gstplugin.c:811:_priv_gst_plugin_load_file_for_registry: GstPluginDesc for '/usr/lib/x86_64-linux-gnu/gstreamer-1.5/libgstamrwbdec.so' has invalid datetime '2015-09-18/created>'
0:00:00.057921344 7311 0x1f32580 ERROR GST_PLUGIN_LOADING gstplugin.c:811:_priv_gst_plugin_load_file_for_registry: GstPluginDesc for '/usr/lib/x86_64-linux-gnu/gstreamer-1.5/libgstamrnb.so' has invalid datetime '2015-09-18/created>'
0:00:00.210414973 7311 0x1f32580 ERROR GST_PLUGIN_LOADING gstplugin.c:811:_priv_gst_plugin_load_file_for_registry: GstPluginDesc for '/usr/lib/x86_64-linux-gnu/gstreamer-1.5/libgstdvdsub.so' has invalid datetime '2015-09-18/created>'
0:00:00.216901218 7311 0x1f32580 ERROR G