This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| "io/ioutil" | |
| "log" | |
| "net/http" | |
| "os" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // compile : $ gcc file.c -lssl -lcrypto | |
| #include <openssl/bio.h> | |
| #include <openssl/ssl.h> | |
| #include <openssl/x509v3.h> | |
| #include <string.h> | |
| #include <stdio.h> | |
| #define DEB printf("%d\n",__LINE__ ); | |
| SSL *get_ssl(BIO *bio) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <title> WebSockets </title> | |
| <script> | |
| try { | |
| var sock = new WebSocket("ws://{{.}}/sock"); | |
| //sock.binaryType = 'blob'; // can set it to 'blob' or 'arraybuffer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Make a map containing clients | |
| ActiveClients = make(map[ClientConn]int) | |
| type ClientConn struct { | |
| websocket *websocket.Conn | |
| clientIP string | |
| } | |
| client := ws.Request().RemoteAddr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import copy | |
| def convert_for_transform(op1, op2): | |
| new_op_1 = {} | |
| new_op_2 = {} | |
| for j in op1: | |
| for i in j: | |
| if i == "retain": | |
| op1_index = j[i] | |
| new_op_1['index'] = op1_index |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ffmpeg -f x11grab -thread_queue_size 64 -video_size 1920x1080 -framerate 30 -i :0 \ | |
| -f v4l2 -thread_queue_size 64 -video_size 320x180 -framerate 30 -i /dev/video0 \ | |
| -f alsa -i default \ | |
| -filter_complex '[0:v][1:v]overlay=main_w-overlay_w:main_h-overlay_h:format=yuv444' \ | |
| -vcodec libx264 -preset ultrafast -qp 0 -pix_fmt yuv444p \ | |
| -c:a aac -b:a 192k \ | |
| video.mkv |
OlderNewer