Receiver: nc -q2 -l 12345 > myfile.tar
Sender tar cf - FILES --verbose --checkpoint=64000 | nc IPDEST 12345
This can be reversed in direction
# e.g. setgov performance or setgov powersave | |
function setgov () | |
{ | |
for i in {0..7}; | |
do | |
cpufreq-set -c $i -g $1; | |
done | |
} | |
# setfreq 3.5GHz 3.5GHz |
.L ./lib/libopencv_videoio.dylib | |
.L ./lib/libopencv_highgui.dylib | |
//.L /usr/local/Cellar/opencv/3.3.0_3/lib/libopencv_highgui.3.3.0.dylib | |
//.L /usr/local/Cellar/opencv/3.3.0_3/lib/libopencv_videoio.3.3.0.dylib | |
#include <opencv2/core.hpp> | |
#include <opencv2/imgproc.hpp> | |
#include <opencv2/highgui.hpp> | |
#include <opencv2/videoio.hpp> | |
#include <math.h> |
git push origin --delete $SQUASHEDBRANCH | |
git branch -d $SQUASHEDBRANCH | |
git checkout master | |
git checkout -b $SQUASHEDBRANCH | |
git merge --squash $BRANCH | |
git commit -am "squashed patch" |
#!/bin/bash | |
read -s -p "Enter Password: " mypassword | |
set -m | |
RESTIC_PASSWORD=$mypassword restic -r $REPO_PATH mount $MOUNT_PATH & | |
lastp=$! | |
sleep 2 | |
open $MOUNT_PATH/tags/$TAG/latest | |
fg |
import argparse | |
from pptx import Presentation | |
from pptx.util import Mm,Pt | |
import pptx | |
import os | |
import csv | |
import json | |
from PIL import Image # uses pillow | |
from csv import DictReader,DictWriter | |
# originally from pygramel | |
class TypedDictReader(DictReader): | |
"""A class for iterating a CSV file and type cast the values.""" | |
def __init__(self, csvfile, casts, fieldnames=None, restkey=None, | |
restval=None, dialect='excel', *args, **kwds): | |
"""Arguments: | |
- f: An iterable object such as as file. Passed on to |
import sys | |
import numpy as np | |
import json | |
import base64 | |
import StringIO | |
import matplotlib.pyplot as plt | |
import sys | |
#https://www.iterm2.com/utilities/imgls | |
def encode_iterm2_image(data,height=None): |
import base64 | |
import sys | |
#https://www.iterm2.com/utilities/imgls | |
def encode_iterm2_image(data,height=None): | |
if height is None: | |
height = "auto" | |
else: | |
height = "%spx" % height | |
return ("\x1B]1337;File=loss.jpg;width=auto;height=%s;inline=1;size=%dpreserveAspectRatio=1:" % (height,len(data))) + base64.b64encode(data) |
# 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 |