This file contains 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 time | |
from datetime import timedelta | |
from multiprocess import Process, Pipe | |
import ipywidgets as widgets | |
from IPython.display import display | |
def run_parallel_tasks(func, tasks, processes=4): | |
progbar = widgets.IntProgress( | |
value=0, | |
min=0, |
This file contains 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
""" | |
Utility to read Huawei's binary firewall NAT session log. For auditing use. | |
PLEASE DO RESPECT THE PRIVACY OF OTHER PEOPLE. | |
Log formats are explained in | |
https://support.huawei.com/enterprise/en/doc/EDOC1000107643?section=j00c | |
Author: Terry Geng | |
Date: 2020-11-26 |
This file contains 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
""" | |
Utility to receive the UDP binary log from a Huawei Router/Firewall. | |
Author: Terry Geng | |
Date: 2020-11-26 | |
""" | |
import socket | |
import select | |
import os | |
import string |
This file contains 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
ssh-keygen -e -m pem -f ~/.ssh/id_rsa.pub | sed '1d;$d' | tr -d '\n' | base64 -d | od -t x1 -An | tr -d ' \n' | tr 'a-f' 'A-F' | sed 's/\(.\{8\}\)/\1 /g' | fold -w 54 |
This file contains 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
#!/bin/bash | |
set -e | |
HELP=" | |
Usage: $0 -h ROUTER_IP -u USER | |
Copy the ssh public key of current logged-in user to a Huawei router. | |
arguments: |
This file contains 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
diff --git a/src/mumble/CustomElements.cpp b/src/mumble/CustomElements.cpp | |
index 0de9bb2f..1b5d5d28 100644 | |
--- a/src/mumble/CustomElements.cpp | |
+++ b/src/mumble/CustomElements.cpp | |
@@ -99,6 +99,16 @@ void ChatbarTextEdit::contextMenuEvent(QContextMenuEvent *qcme) { | |
delete menu; | |
} | |
+void ChatbarTextEdit::dragEnterEvent(QDragEnterEvent *evt) { | |
+ inFocus(true); |
This file contains 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
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt | |
index 649b1cf3..5ecf7dcd 100644 | |
--- a/src/CMakeLists.txt | |
+++ b/src/CMakeLists.txt | |
@@ -22,6 +22,21 @@ find_pkg(Qt5 | |
REQUIRED | |
) | |
+# OpenSSL | |
+find_package(OpenSSL REQUIRED) |
This file contains 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
diff --git a/src/mumble/AudioOutputSample.cpp b/src/mumble/AudioOutputSample.cpp | |
index 7be541f0..dfb6f017 100644 | |
--- a/src/mumble/AudioOutputSample.cpp | |
+++ b/src/mumble/AudioOutputSample.cpp | |
@@ -14,6 +14,11 @@ | |
#include <cmath> | |
+#include <fstream> | |
+#include <string> |
This file contains 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
/* | |
http://www.guokr.com/post/78432/ | |
*/ | |
#include<cstdio> | |
#include<cstring> |
This file contains 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
#include<iostream> | |
int main(){ | |
std::cout<<"Hello world!\n"; | |
return 0; | |
} |