Skip to content

Instantly share code, notes, and snippets.

@B-R-Bender
B-R-Bender / ubuntu-openvpn-setup
Last active Mar 19, 2020
How to setup OpenVPN on Ubuntu 18.04 (with autostart)
View ubuntu-openvpn-setup
OpenVPN connection setup
sudo apt-get install network-manager-openvpn
sudo apt-get install network-manager-openvpn-gnome
save *.ovpn config somwhere
network settings -> VPN -> + -> load from file -> *.ovpn
OpenVPN connection autostart
@B-R-Bender
B-R-Bender / gist:8e71e8f9b72584e53748f607199814ad
Last active Feb 3, 2021
Janus gateway handleRemoteJsep.dengeroslyCustomizeSdp callback
View gist:8e71e8f9b72584e53748f607199814ad
function prepareWebrtcPeer(handleId, callbacks) {
callbacks = callbacks || {};
callbacks.success = (typeof callbacks.success == "function") ? callbacks.success : Janus.noop;
callbacks.error = (typeof callbacks.error == "function") ? callbacks.error : webrtcError;
callbacks.dangerouslyCustomizeSdp = (typeof callbacks.dangerouslyCustomizeSdp == "function") ? callbacks.dangerouslyCustomizeSdp : Janus.noop;
...
if (jsep) {
if (!config.pc) {
Janus.warn("Wait, no PeerConnection?? if this is an answer, use createAnswer and not handleRemoteJsep");
callbacks.error("No PeerConnection: if this is an answer, use createAnswer and not handleRemoteJsep");