I hereby claim:
- I am beansecurity on github.
- I am beansecurity (https://keybase.io/beansecurity) on keybase.
- I have a public key ASB1rvH_3jzsYK9CUeI5JSrucO3unwCiDL-aDeFTDY2JvQo
To claim this, I am signing this object:
""" | |
http://stackoverflow.com/questions/28022432/receiving-rtp-packets-after-rtsp-setup | |
A demo python code that .. | |
1) Connects to an IP cam with RTSP | |
2) Draws RTP/NAL/H264 packets from the camera | |
3) Writes them to a file that can be read with any stock video player (say, mplayer, vlc & other ffmpeg based video-players) | |
Done for educative/demonstrative purposes, not for efficiency..! |
(setq shell-switch-lang "xte 'keydown Shift_L' 'keydown Shift_R' 'keyup Shift_L' 'keyup Shift_R'") ;; shell command that switch layouts emulating setxkbmap toggle keybind (left Shift+right Shift for me) | |
;; 'xte' from 'xautomation' package | |
(setq get-current-lang (lambda () (substring (shell-command-to-string "getxkblayout") 0 2))) ;; get C script 'getxkblayout' and compile from my gist | |
(setq-default prev-lang (funcall get-current-lang)) ;; save previous layout | |
(add-hook 'evil-insert-state-entry-hook ;; change layout whiforle insert mode starting if its not similar to previous | |
(lambda () | |
(if (not (equal prev-lang | |
(funcall get-current-lang))) | |
(shell-command shell-switch-lang)))) | |
(add-hook 'evil-insert-state-exit-hook ;; change layout to default(eng) exiting insert mode |
I hereby claim:
To claim this, I am signing this object:
// compile with `gcc -I/usr/include getxkblayout.c -lX11 -lxkbfile -o /usr/local/bin/getxkblayout` | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <X11/XKBlib.h> | |
#include <X11/extensions/XKBrules.h> | |
int main(int argc, char **argv) { | |
Display *dpy = XOpenDisplay(NULL); |
package main | |
import ( | |
"bufio" | |
"io/ioutil" | |
"log" | |
"net/http" | |
"os" | |
"strings" | |
) |