Skip to content

Instantly share code, notes, and snippets.

@Samfox2
Samfox2 / TestPage.swift
Created February 6, 2022 21:50 — forked from tsuzukihashi/TestPage.swift
SwiftUI ActivityViewController Share Image
import SwiftUI
struct TestPage: View {
@State private var rect: CGRect = .zero
@State private var uiImage: UIImage? = nil
@State private var showShareSheet = false
var body: some View {
VStack {
HStack {
@Samfox2
Samfox2 / TestPage.swift
Created February 6, 2022 21:49 — forked from tsuzukihashi/TestPage.swift
SwiftUI View to UIImage
import SwiftUI
struct TestPage: View {
@State private var rect: CGRect = .zero
@State var uiImage: UIImage? = nil
var body: some View {
VStack {
HStack {
Image(systemName: "sun.haze")
@Samfox2
Samfox2 / ThreadExample.pro
Created January 23, 2020 18:39 — forked from DeiVadder/ThreadExample.pro
Qt ThreadExample
#-------------------------------------------------
#
# Project created by QtCreator 2017-05-31T16:27:44
#
#-------------------------------------------------
QT += core gui concurrent
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
@Samfox2
Samfox2 / README.md
Created May 2, 2019 20:20 — forked from tetkuz/README.md
GStreamer stream to HTML5

Description

[Server] GStreamer ---> HTML [Client]

Require

  • gstreamer-1.x
  • Browser which supports video tag of HTML5

debian

@Samfox2
Samfox2 / compile-ffmpeg-nvenc.sh
Created April 25, 2019 09:44
This bash script will compile a static Ffmpeg build with NVENC and VAAPI hardware-accelerated support on Ubuntu in your home directory. You can modify the script to customize the build options as you see fit.
#!/bin/bash
#This script will compile and install a static ffmpeg build with support for nvenc un ubuntu.
#See the prefix path and compile options if edits are needed to suit your needs.
#install required things from apt
installLibs(){
echo "Installing prerequisites"
sudo apt-get update
sudo apt-get -y --force-yes install autoconf automake build-essential libass-dev libfreetype6-dev libgpac-dev \
@Samfox2
Samfox2 / tegra-cam.py
Created March 20, 2019 11:25 — 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 <jkjung13@gmail.com>
@Samfox2
Samfox2 / laundry-spy.ino
Created August 12, 2018 21:38 — forked from savetheclocktower/laundry-spy.ino
Laundry Spy firmware
// (see the blog post at https://andrewdupont.net/2018/04/27/laundry-spy-part-3-the-software/)
// GENERAL CONFIG
// ==============
// The baud rate of serial output for logging. If necessary, change the baud
// rate in your Serial Monitor to match this.
#define BAUD_RATE 115200
// The name by which this device will identify itself over mDNS (Bonjour).