Skip to content

Instantly share code, notes, and snippets.

View aryehbeitz's full-sized avatar

Aryeh Beitz aryehbeitz

View GitHub Profile
@aryehbeitz
aryehbeitz / detect-private-browsing.js
Created February 25, 2019 14:52 — forked from cou929/detect-private-browsing.js
Detect private browsing mode (InPrivate Browsing or Incognito).
function retry(isDone, next) {
var current_trial = 0, max_retry = 50, interval = 10, is_timeout = false;
var id = window.setInterval(
function() {
if (isDone()) {
window.clearInterval(id);
next(is_timeout);
}
if (current_trial++ > max_retry) {
window.clearInterval(id);
@aryehbeitz
aryehbeitz / Git_Bisect.md
Last active October 26, 2022 08:34 — forked from stevenyap/Git_Bisect.md
Finding bugs in Git commits using git bisect

You have a git commit in your history that is causing a bug but you do not know which commit it is. Here's how to use git bisect to find the commit that causes the bug.

# in the git root, start the git bisect
git bisect start

# mark current commit as bad
git bisect bad
@aryehbeitz
aryehbeitz / GoPro RTMP streaming with FFmpeg
Created October 3, 2017 07:35 — forked from laurieainley/GoPro RTMP streaming with FFmpeg
Live streaming from a GoPro Hero3 camera to RTMP server using FFmpeg
Basic Requirements:
Computer with wired and wireless connection
FFmpeg installation: http://www.ffmpeg.org/
GoPro Hero 3+: http://gopro.com/
RTMP server e.g. FMS (http://www.adobe.com/products/adobe-media-server-family.html) or CDN ingest point
Overview:
GoPro Hero3 cameras produce HLS streams which are consumed by control apps and their removeable monitor.
@aryehbeitz
aryehbeitz / GoPro RTMP streaming with FFmpeg
Created October 3, 2017 07:35 — forked from laurieainley/GoPro RTMP streaming with FFmpeg
Live streaming from a GoPro Hero3 camera to RTMP server using FFmpeg
Basic Requirements:
Computer with wired and wireless connection
FFmpeg installation: http://www.ffmpeg.org/
GoPro Hero 3+: http://gopro.com/
RTMP server e.g. FMS (http://www.adobe.com/products/adobe-media-server-family.html) or CDN ingest point
Overview:
GoPro Hero3 cameras produce HLS streams which are consumed by control apps and their removeable monitor.
@aryehbeitz
aryehbeitz / gpControl.json
Created October 2, 2017 08:18 — forked from 3v1n0/gpControl.json
GoPro Hero4 Remote tools
{
"version":2.0,
"display_hints":[
{
"key":"GPCAMERA_GROUP_VIDEO",
"display_name":"Video Settings",
"settings":[
{
"setting_id":5,
"widget_type":"select",
@aryehbeitz
aryehbeitz / angularjs_directive_attribute_explanation.md
Created March 13, 2017 11:12 — forked from CMCDragonkai/angularjs_directive_attribute_explanation.md
JS: AngularJS Directive Attribute Binding Explanation

AngularJS Directive Attribute Binding Explanation

When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.

  1. Raw Attribute Strings

    <div my-directive="some string" another-param="another string"></div>