Skip to content

Instantly share code, notes, and snippets.

cd ~
sudo apt-get update
sudo apt-get install openjdk-7-jre-headless -y
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch and replace wget link below
# NEW WAY / EASY WAY
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.1.1.deb
sudo dpkg -i elasticsearch-1.1.1.deb
@vahidov
vahidov / gist:182592b1ede99a49e225
Created December 11, 2015 23:35
Elascticsearch add/remove array element
curl -XPOST 'localhost:9200/test/type1/1/_update' -d '{
"script" : "ctx._source.tags += tag",
"params" : {
"tag" : "blue"
}
}'
curl -XPOST 'localhost:9200/test/type1/1/_update' -d '{
"script" : "ctx._source.tags.remove(tag)",
"params" : {
@vahidov
vahidov / @layout.latte
Created January 4, 2018 13:45 — forked from jiripudil/@layout.latte
Nette ♥ webpack-dev-server
<!DOCTYPE html>
<html lang="cs">
<head>
<title>{block title}Foo{/block}</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="{$bundlePath}/styles.css" rel="stylesheet">
</head>
<body>
{include #content}
@vahidov
vahidov / janus.Dockerfile
Created June 15, 2018 09:08
Janus Dockerfile
FROM debian:stretch
ENV LIBWEBSOCKETS_VERSION=2.4.2
ENV USRSCTP_VERSION=0.9.3.0
ENV LIBSRTP_VERSION=2.2.0
ARG BUILD_SRC="/usr/local/src"
ARG JANUS_CONFIG_DEPS="\
--prefix=/opt/janus \
"
@vahidov
vahidov / janus_params.json
Last active July 24, 2018 10:15
janus params
RoomCreateParams
{
"room": 123456,
"secret": "secret",
"is_private": false,
"pin": "masterPin",
"publishers": 1,
"bitrate": 128000,
"fir_freq": 1,
"audiocodec": "opus",
@vahidov
vahidov / gist:d2ae7286e9e4ffec5b4885e206bf3618
Created August 31, 2018 10:10
Webrtc test camera exact resolutions
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<style type="text/css">
#errors {
color: gray;
(gdb) bt full
#0 0x00006b6860f3c746 in janus_videoroom_handler (data=0x0) at plugins/janus_videoroom.c:5573
i = 0
playout_delay_extmap = 1
iter = {dummy1 = 0x6b67e4316e40, dummy2 = 0x0, dummy3 = 0x0, dummy4 = 8, dummy5 = 0, dummy6 = 0x5f}
audio_level_extmap = 0
video_orient_extmap = 1
video_orient_mdir = JANUS_SDP_DEFAULT
videoroom = 0x6b67b0039cc0
error_str = "[plugins/janus_videoroom.c:janus_videoroom_handler:5043] ", '\000' <repeats 447 times>...
@vahidov
vahidov / janus crash 04.19
Last active April 9, 2019 14:48
janus crash 04.19
---------------------------------------------------------------
First crash
---------------------------------------------------------------
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x0000770681a8e0d3 in _lws_change_pollfd.part.1 () from /usr/lib/libwebsockets.so.13
[Current thread is 1 (Thread 0x770509d09700 (LWP 3027))]
(gdb) bt full
#0 0x0000770681a8e0d3 in _lws_change_pollfd.part.1 () from /usr/lib/libwebsockets.so.13
@vahidov
vahidov / janus crash ice_setup_local
Created April 15, 2019 09:58
janus crash ice_setup_local
(gdb) bt full
#0 0x00006e6d607b5cd0 in ?? () from /usr/lib/x86_64-linux-gnu/libnice.so.10
No symbol table info available.
#1 0x00006e6d607b5d17 in ?? () from /usr/lib/x86_64-linux-gnu/libnice.so.10
No symbol table info available.
#2 0x00006e6d607a776d in ?? () from /usr/lib/x86_64-linux-gnu/libnice.so.10
No symbol table info available.
#3 0x00006e6d6079f44d in nice_agent_add_stream () from /usr/lib/x86_64-linux-gnu/libnice.so.10
No symbol table info available.
#4 0x0000002dc7409f0c in janus_ice_setup_local (handle=0x6e6d2c04d7b0, offer=0, audio=1, video=1, data=0, trickle=1) at ice.c:3305
@vahidov
vahidov / gist:a74a6ca65956fa6846581f5c4de1fb89
Created April 24, 2019 09:23
janus_ice_outgoing_stats_handle-crash
```
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/opt/janus/bin/janus'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00000247def5a1c1 in janus_ice_outgoing_stats_handle (
user_data=0x710320343bc0) at ice.c:3682
3682 ice.c: No such file or directory.
[Current thread is 1 (Thread 0x7101d0720700 (LWP 15609))]
(gdb) bt full