Skip to content

Instantly share code, notes, and snippets.

@akarak
akarak / flussonic-webrtc-playback.html
Created September 20, 2017 11:23 — forked from theleon/flussonic-webrtc-playback.html
Flussonic WebRTC Playback
<!doctype html>
<html>
<head>
<!-- https://github.com/webrtc/adapter is used for cross-browser interop -->
<script type="text/javascript" src="https://unpkg.com/webrtc-adapter@2.0.8/out/adapter.js"></script>
</head>
<body>
<video id="container" controls autoplay></video>
<script>
window.onload = function() {
@akarak
akarak / npm-win-proxy.ps1
Created September 21, 2017 10:04 — forked from damieng/npm-win-proxy.ps1
Apply Windows proxy settings to npm automatically
try {
$proxyKey = (Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name ProxyServer -ErrorAction Stop).ProxyServer
foreach($proxy in $proxyKey.Split(';')) {
$parts = $proxy.Split('=')
switch ($parts[0]) {
'http' { iex "npm config set proxy http://$parts[1]"; break }
'https' { iex "npm config set https-proxy http://$parts[1]"; break }
}
}
}
@akarak
akarak / ffmpeg-hap-readme.md
Created April 26, 2018 09:52 — forked from dlublin/ffmpeg-hap-readme.md
Encoding to Hap from the command line using FFmpeg

Encoding to Hap from the command line using FFmpeg

For users who prefer working with a command line or need to access advanced encoding settings for Hap the popular FFmpeg library can be used to work with Hap movies.

  1. If this is your first time using FFmpeg you may need to install it on your system, or compile it from source. In either case be sure that Snappy is enabled as part of the binary. If you already have FFmpeg on your system with Snappy enabled, you can skip this step.

    You can check that your version of FFmpeg can encode Hap using

    ffmpeg -encoders | grep hap
    
@akarak
akarak / rtmp.md
Created June 3, 2018 11:36 — forked from mfd/rtmp.md
Grab RTMP stream from echo.msk.ru

Save RTMP video/audio stream

brew install rtmpdump

RTMPDump manual

RTMPDump

RTMPDump при скачивании потоков по умолчанию использует так называемый "Pause/Unpause BUFX hack" для увеличения скорости скачивания, но на live трансляциях и некоторых видеозаписях это приводит к тому, что выходной файл получается "дерганным", т.е. одни и те же фрагменты потока скачиваются многократно (буря мглою небо кроет... мглою небо кроет вихри снежные... небо кроет вихри... и т.д.) и размер файла становится в несколько раз больше.

@akarak
akarak / parameters.vbs
Last active March 30, 2022 17:52 — forked from mlhaufe/parameters.vbs
VBScript class constructor parameters
Class Person
Private m_Age
Private m_Name
Public Default Function Init(Name, Age)
m_Name = Name
m_Age = Age
Set Init = Me
End Function
@akarak
akarak / git_remember_password.md
Created January 22, 2019 12:53 — forked from ankurk91/git_remember_password.md
Git credential cache, why type password again and again

Git tip: Tired of entering password again and again ?

Run this command to remember your password:

git config --global credential.helper 'cache --timeout 28800'

Above command will tell git to cache your password for 8 hours.

@akarak
akarak / gist:fb199b141895ea5ed46c0a739a41c106
Last active March 10, 2019 12:49
Auto-Complete for python-docx in IDE

When i use python-docx, I can't Auto-Complete it:

from docx import Document

asd = Document()
asd.add_heading("test")
asd.save("cao.docx")

docx.Document(...) is actually a method, which returns an object of the docx.document.Document class. You hve been trying to treat this (docx.Document()) method as a class. Hence, you shall use both the following imports, in order to get the visibility of the contents of docx.document.Document class:

@akarak
akarak / read-access.sql
Created May 30, 2019 17:37 — forked from oinopion/read-access.sql
How to create read only user in PostgreSQL
-- Create a group
CREATE ROLE readaccess;
-- Grant access to existing tables
GRANT USAGE ON SCHEMA public TO readaccess;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess;
-- Grant access to future tables
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readaccess;
# Script created by Ian Morrish
# See https://ianmorrish.wordpress.com/2019/03/02/atem-wireless-multiviewer-with-touch-switching/
# Run Newtek studio monitor first, select input and set to full screen.
# this script requires my switcherlib.dll which you can get from the site above
# after starting this script, <ALT><Tab> to see the multiview live video feed (I will automate this soon)
#Show-Process "overlay"
# Connect to ATEM
function ConnectToATEM()
@akarak
akarak / Get-VideoHubRouting.ps1
Created June 4, 2019 10:34 — forked from imorrish/Get-VideoHubRouting.ps1
Create Excel Matrix showing Blackmagic VideoHub routing
#Get video hub properties and add to Excel file
# Author: Ian Morrish
# Website: https://ianmorrish.wordpress.com
# tested on Windows 10 running in ISE with Excel 2016
# update the IP address and path to included send-tcprequest.ps1 scrit as required
$VideoHupIP = "127.0.0.1"
$hubcommand = @"
VIDEO OUTPUT ROUTING:
`r`n