Skip to content

Instantly share code, notes, and snippets.

@jenhaoyang
jenhaoyang / linux-dialup-modems.md
Created September 21, 2023 09:56 — forked from nstarke/linux-dialup-modems.md
Connecting to Raspberry Pi's using 56k Modems

Dial Up Connections on Linux

In this tutorial we will detail how to connect two linux hosts via 56k modems. To do this we will use the following components:

@jenhaoyang
jenhaoyang / boot.bat
Last active June 26, 2023 08:37 — forked from jamesrcounts/boot.bat
Scripted rabbitmq install. This Script will install rabbitmq 3.10.1. Erlang will be automatically install before rabbitmq. Do not install erlang manually.
@powershell -ExecutionPolicy unrestricted .\bootmq.ps1
################################################################################
# Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
creating uridecodebin for [rtsp://192.168.8.53/live1.sdp]
Unknown key 'enable-past-frame' for group [tracker]Unknown key 'display-tracking-id' for group [tracker]0:00:02.298625711 2664946 0x55dfc91f1ea0 WARN nvinfer gstnvinfer.cpp:677:gst_nvinfer_logger:<secondary-nvinference-engine3> NvDsInferContext[UID 4]: Warning from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1897> [UID = 4]: deserialize engine from file :/opt/nvidia/deepstream/deepstream-6.2/samples/models/Secondary_VehicleTypes/resnet18.caffemodel_b16_gpu0_int8.engine failed
0:00:02.369860234 2664946 0x55dfc91f1ea0 WARN nvinfer gstnvinfer.cpp:677:gst_nvinfer_logger:<secondary-nvinference-engine3> NvDsInferContext[UID 4]: Warning from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2002> [UID = 4]: deserialize backend context from engine from file :/opt/nvidia/deepstream/deepstream-6.2/samples/models/Secondary_VehicleTypes/resnet18.caffemodel_b16_gpu0_int8.en
################################################################################
# Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
@jenhaoyang
jenhaoyang / mysqldump-cron.sh
Created August 1, 2022 01:57 — forked from ebta/mysqldump-cron.sh
Backup MySQL Database Daily, Weekly and Monthly
#!/bin/bash
# Modified from: https://grahamrpugh.com/2019/01/15/mysqldump-daily-weekly-monthly.html
# Create database user with these privileges:
# SELECT, RELOAD, SHOW DATABASES, LOCK TABLES, TRIGGER, SHOW VIEW
#
# CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
# GRANT SELECT, RELOAD, SHOW DATABASES, LOCK TABLES, TRIGGER, SHOW VIEW ON *.* TO 'newuser'@'localhost';
# FLUSH PRIVILEGES;
@jenhaoyang
jenhaoyang / colortrace.py
Last active April 16, 2022 11:44 — forked from exhuma/colortrace.py
Simple Python Traceback for Slack
'''
This module provides a function ``make_except_hook`` which returns a function
usable as replacement for ``sys.excepthook``.
All imports are done dynamically to make this function a self-contained,
copy/pasteable piece of code.
Requires the "blessings" module to work!
--- License - (MIT) ----------------------------------------------------------
@jenhaoyang
jenhaoyang / client.py
Created August 31, 2020 07:21 — forked from kylehounslow/client.py
Send and receive images using Flask, Numpy and OpenCV
from __future__ import print_function
import requests
import json
import cv2
addr = 'http://localhost:5000'
test_url = addr + '/api/test'
# prepare headers for http request
content_type = 'image/jpeg'
@jenhaoyang
jenhaoyang / .gitconfig
Created March 5, 2020 09:14 — forked from shawndumas/.gitconfig
Using WinMerge as the git Diff/Merge Tool on Windows 64bit
[mergetool]
prompt = false
keepBackup = false
keepTemporaries = false
[merge]
tool = winmerge
[mergetool "winmerge"]
name = WinMerge
@jenhaoyang
jenhaoyang / install virtualenv ubuntu 16.04.md
Created September 12, 2019 03:47 — forked from Geoyi/install virtualenv ubuntu 16.04.md
How to install virtual environment on ubuntu 16.04

How to install virtualenv:

Install pip first

sudo apt-get install python3-pip

Then install virtualenv using pip3

sudo pip3 install virtualenv