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
# Only for remote UDP https://stackpointer.io/network/ssh-port-forwarding-tcp-udp/365/ | |
# Local UDP server to Remote UDP server | |
ssh -L 9999:127.0.0.1:9999 percro@alientelecom socat tcp4-listen:9999,reuseaddr,fork udp:target:9999 | |
socat -T15 udp4-recvfrom:9999,reuseaddr,fork tcp:localhost:9999 | |
# Remote UDP server to Local UDP server | |
ssh -R 9999:127.0.0.1:9999 percro@alientelecom socat udp4-recvfrom:9999,reuseaddr,fork tcp:localhost:9999 | |
socat -T15 tcp4-listen:9999,reuseaddr,fork udp:localhost:9999 |
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
# Emanuele Ruffaldi 2018 | |
import argparse,socket,socket,json,time | |
def str2bool(v): | |
if v.lower() in ('yes', 'true', 't', 'y', '1'): | |
return True | |
elif v.lower() in ('no', 'false', 'f', 'n', '0'): | |
return False | |
else: | |
raise argparse.ArgumentTypeError('Boolean value expected.') |
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
// g++-mp-4.9 -fopenmp --std=c++11 x.cpp -lgomp | |
#include <iostream> | |
#include <omp.h> | |
#include <unistd.h> | |
class Custom | |
{ | |
public: | |
Custom(int y = 0) : x(y) {} |
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
# EXCLUDES Comments | |
from pptx import Presentation | |
import sys | |
prs = Presentation(sys.argv[1]) | |
for i,slide in enumerate(prs.slides): | |
print("---------------------- Slide %d" % (i+1)) | |
for shape in slide.shapes: | |
if hasattr(shape, "text"): | |
print(shape.text) |
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
# | |
# Extract files from Bare git-annex repositories without git-annex | |
# Supports version v6 | |
# | |
# See internals: http://git-annex.branchable.com/internals/ | |
# | |
# Modified: added non-bare repos, added tar file (of symlinks) output for use with archivemount | |
# | |
# TODO: improve output | |
# TODO: use cat-files instead of archive |
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
# See: https://www.kernel.org/doc/Documentation/usb/usbmon.txt | |
# See: http://people.redhat.com/zaitcev/linux/OLS05_zaitcev.pdf | |
# | |
# Emanuele Ruffaldi @ SSSA 2016 | |
import sys,os | |
def scan(name,device=0): | |
hdevices = dict() | |
try: |
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
% based on combination of online info | |
git clone https://github.com/opencv/opencv.git -b "4.5.2" --depth 1 | |
git clone https://github.com/opencv/opencv_contrib.git -b "4.5.2" --depth 1 | |
set "opencvSource=opencv-4.5.2" | |
set "opencvExtraModules=opencv_contrib-4.5.2/modules" | |
set "opencvBuild=%opencvSource%\build" | |
set "compiler=Visual Studio 16 2019" | |
set "buildType=Release" | |
set python3_executable |
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 cairo,argparse,random | |
#TEST: https://jcmellado.github.io/js-aruco/getusermedia/getusermedia.html | |
#http://terpconnect.umd.edu/~jwelsh12/enes100/markergen.html | |
#http://terpconnect.umd.edu/~jwelsh12/enes100/markers.js | |
markers_opts = [[False,True,True,True,True],[False,True,False,False,False] | |
,[True,False,True,True,False],[True,False,False,False,True]]; | |
import string | |
digs = string.digits + string.letters |
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
digraph G | |
{ | |
node [shape=box]; | |
BIOS -> MBR -> bootmgr -> winload -> otherOSes; | |
winload -> ntoskrnl; | |
ntoskrnl [label="ntoskrnl.exe\nLoad Drivers\nLogs in ntbtlog.txt"]; | |
ntoskrnl -> idleprocess; | |
idleprocess [label="IDLE process (0)"]; | |
ntoskrnl -> systemprocess; |