Skip to content

Instantly share code, notes, and snippets.

@ruzrobert
ruzrobert / SetAutoLengthForAllVideosInProshowProducer.py
Created June 19, 2023 09:33
This Python script sets all videos in ProShow Producer to "Lock slide time to video length" mode
import re
from pathlib import Path
project_path = input('Please paste path to the ProShow Producer project:\n')
with open(project_path) as file:
lines = [line.rstrip() for line in file]
project_text = '\n'.join(lines)
cell_re = r"cell\[(\d+)]\.images\[0]\.isVideo=1"
cell_matches = re.findall(cell_re, project_text, re.MULTILINE)
@ruzrobert
ruzrobert / ThroughStream.cs
Last active January 10, 2024 16:33
A special type of Lazy MemoryStream, made to connect an output streaming data and a stream consumer.
using System;
using System.IO;
/// <summary>
/// A special type of Lazy MemoryStream, made to connect an output streaming data and a stream consumer.
/// Useful when an output can only be streamed to a stream,
/// and can not create it's own new stream (for example Ionic Zip Extract).
///
/// The data is written lazily - this stream does not store any data.
/// The writing is done by directly writing the data to the read buffer, provided by the actual reader.
@ruzrobert
ruzrobert / Vibration.cs
Last active April 2, 2024 08:16
Android Vibration for Unity 3D. Supports all API: 1 - 29 (auto detect), Amplitudes, Predefined Effects, both Legacy and >=26 APIs.
using System.Diagnostics.CodeAnalysis;
using UnityEngine;
// Dont forget to add "using RDG;" to the top of your script!
namespace RDG
{
/// <summary>
/// Class for controlling Vibration. Automatically initializes before scene is loaded.
/// </summary>
public static class Vibration