Skip to content

Instantly share code, notes, and snippets.

View aryehbeitz's full-sized avatar

Aryeh Beitz aryehbeitz

View GitHub Profile

Keybase proof

I hereby claim:

  • I am aryehbeitz on github.
  • I am aryehbeitz (https://keybase.io/aryehbeitz) on keybase.
  • I have a public key whose fingerprint is CBD5 6A91 DA4C 0418 F2B9 78EB B590 1D1E 38E8 337A

To claim this, I am signing this object:

@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>

Keybase proof

I hereby claim:

  • I am aryehbeitz on github.
  • I am aryehbeitz (https://keybase.io/aryehbeitz) on keybase.
  • I have a public key ASC2TKWYOS0yXOw7BzcnEDNKEbbhPj0zu1Dlfgjh40FTJwo

To claim this, I am signing this object:

@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 / 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 / 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 / postgres.stuff
Last active July 10, 2019 08:05
postgres stuff
sudo su - postgres
psql
\l - list databases
\c db_name - connect to database
ALTER DATABASE db RENAME TO newdb; - rename database
\dt - list tables
\d+ tablename - list fields for table
\du - list users
CREATE DATABASE dbname;
DROP DATABASE [IF EXISTS] name;
@aryehbeitz
aryehbeitz / mysql.txt
Last active August 23, 2019 10:40
mysql stuff
mysql -u root -p
FLUSH PRIVILEGES;
GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost' IDENTIFIED BY 'password';
GRANT SELECT ON *.* TO 'username'@'localhost';
mysql -u username -p
CREATE DATABASE dbname;
USE dbname;
mysql -u username -p < example.sql
DROP DATABASE dbname;
@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);