Skip to content

Instantly share code, notes, and snippets.

View BlackHacked's full-sized avatar
📷
Hello World

Latin BlackHacked

📷
Hello World
View GitHub Profile
@BlackHacked
BlackHacked / mongo-docker-compose.yml
Created August 30, 2022 08:56 — forked from gbzarelli/mongo-docker-compose.yml
Initializing mongo db in docker-compose with init script
version: '3.8'
services:
# Database - Mongo DB
mongo:
image: mongo
environment:
MONGO_INITDB_ROOT_USERNAME: helpdev
MONGO_INITDB_ROOT_PASSWORD: 123456
#!/usr/bin/env python3
# -*- coding:utf-8 -*-
# GStreamer SDK Tutorials in Python
#
# basic-tutorial-2
#
"""
basic-tutorial-2: GStreamer concepts
http://docs.gstreamer.com/display/GstSDK/Basic+tutorial+2%3A+GStreamer+concepts
"""
@BlackHacked
BlackHacked / README.md
Created May 16, 2022 04:01 — forked from bangonkali/README.md
Jetson Xavier NX Notes

Docker Snippets

Create a deepstream-l4t docker container instance.

sudo docker run -it \
  --rm \
  --net=host \
  --runtime nvidia \
 -e DISPLAY=$DISPLAY \
@BlackHacked
BlackHacked / tegra-cam.py
Created May 16, 2022 01:38 — forked from jkjung-avt/tegra-cam.py
Capture and display video from either IP CAM, USB webcam, or the Tegra X2/X1 onboard camera.
# --------------------------------------------------------
# Camera sample code for Tegra X2/X1
#
# This program could capture and display video from
# IP CAM, USB webcam, or the Tegra onboard camera.
# Refer to the following blog post for how to set up
# and run the code:
# https://jkjung-avt.github.io/tx2-camera-with-python/
#
# Written by JK Jung <[email protected]>

Without either MONGO_INITDB_ROOT_USERNAME, or MONGO_INITDB_ROOT_PASSWORD the access is unrestricted.

docker-compose.yml:

version: '3'

services:
  mongo:
    image: mongo
@BlackHacked
BlackHacked / stuns
Created April 13, 2022 06:59 — forked from yetithefoot/stuns
STUN+TURN servers list
{url:'stun:stun01.sipphone.com'},
{url:'stun:stun.ekiga.net'},
{url:'stun:stun.fwdnet.net'},
{url:'stun:stun.ideasip.com'},
{url:'stun:stun.iptel.org'},
{url:'stun:stun.rixtelecom.se'},
{url:'stun:stun.schlund.de'},
{url:'stun:stun.l.google.com:19302'},
{url:'stun:stun1.l.google.com:19302'},
{url:'stun:stun2.l.google.com:19302'},
@BlackHacked
BlackHacked / chunk_upload.py
Last active October 12, 2021 08:55 — forked from nbari/chunk_upload.py
python chunk upload files
import os
def read_in_chunks(file_object, chunk_size=1000000):
while True:
data = file_object.read(chunk_size)
if not data:
break
yield data
def main(file):
@BlackHacked
BlackHacked / readme.md
Last active March 13, 2023 14:22
n1 docker openwrt

镜像构建

FROM scratch
ADD openwrtmix-n1-R20.2.15-rootfs.tar.gz /
RUN mkdir /var/lock
USER root
CMD /sbin/init

食用方法

@BlackHacked
BlackHacked / vcode_gen.py
Created June 21, 2021 03:41 — forked from ayuLiao/vcode_gen.py
python生成验证码,这个漂亮点,代码量也小
from captcha.image import ImageCaptcha # pip install captcha
import numpy as np
import matplotlib.pyplot as plt
from PIL import Image
import random
# 验证码中的字符, 就不用汉字了
number = ['0','1','2','3','4','5','6','7','8','9']
alphabet = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
ALPHABET = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
@BlackHacked
BlackHacked / WSLConfig.md
Created May 28, 2021 03:13 — forked from doggy8088/WSLConfig.md
WSL 2 的 .wslconfig 設定檔說明
  • 編輯 %UserProfile%\.wslconfig 檔案

    • Command Prompt

      notepad %UserProfile%\.wslconfig
    • Windows PowerShell