Skip to content

Instantly share code, notes, and snippets.

View RobTranquillo's full-sized avatar

trnq1ll0 RobTranquillo

View GitHub Profile
@RobTranquillo
RobTranquillo / DisableObjectsWithTagsMenuItem.cs
Last active July 26, 2023 14:18
Extend the basic VR-Builder "Enable by Tag" to support a second tag.
using VRBuilder.Core.Behaviors;
using VRBuilder.Editor.UI.StepInspector.Menu;
namespace VRBuilder.Editor.UI.Behaviors
{
/// <inheritdoc />
public class DisableObjectsWithTagsMenuItem : MenuItem<IBehavior>
{
/// <inheritdoc />
public override string DisplayedName { get; } = "Environment/Disable Objects By Tags";
@RobTranquillo
RobTranquillo / AudioCapture.cs
Last active June 29, 2020 11:57
Unity AudioCapture using a ConcurrentQueue (to a PCM Wav file)
using System;
using System.IO;
using System.Collections;
using System.Collections.Concurrent;
using UnityEngine;
/// <summary>
/// Recording 5 seconds from the first microphone in Microphone.devices
/// to a PCM Wav file using a ConcurrentQueue.
///
@RobTranquillo
RobTranquillo / index.html
Created March 17, 2020 14:10
AR.js on Android and iOS supporting a video with audio track
<!--
This one mainly based on https://github.com/taylordigital13/ARjs_Unity
Fullscreen buttons are just simple png and the video is mpeg-4 baseline-profile with AAC audio.
The video is placed on the Hiro marker and playback is stopped until the user clicks the play button.
The same applies to losing and finding the marker again.
Problem: On iOS, the video sticks 1.5 times below the actual mark on the screen.
This, I have read, comes from the VR setup on iOS, which sets the camera a bit higher.
!-->
$ sudo docker-compose up
Recreating dockershopware_mysql_1 ... done
Recreating dockershopware_php-7.0_1 ... done
Recreating dockershopware_web_1 ... done
Attaching to dockershopware_mysql_1, dockershopware_php-7.0_1, dockershopware_web_1
mysql_1 | 2018-07-26T12:32:30.749068Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release.
mysql_1 | 2018-07-26T12:32:30.749617Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.11) starting as process 1
mysql_1 | mbind: Operation not permitted
mysql_1 | mbind: Operation not permitted
mysql_1 | mbind: Operation not permitted
@RobTranquillo
RobTranquillo / gist:cd08d85438f9ef03ce21
Created January 29, 2016 06:17
Meteor mongod not starting on Debian+Docker, problem solution history
$ meteor
=> Started proxy.
Unexpected mongo exit code 1. Restarting.
Unexpected mongo exit code 1. Restarting.
Unexpected mongo exit code 1. Restarting.
Can't start Mongo server.
MongoDB failed global initialization
--
@RobTranquillo
RobTranquillo / gist:7f417b802dcf33780ef5
Last active August 29, 2015 14:23
[ParkAPI] a modul, to get an old totals value from json file or null
#if a city does not send totals so we push totals to the higest known value in the json file
#
# problem: if one lot name exist twice, it takes always the last value
# but a lot name should never exists more than one time
def get_lastlots ( lot_name ) :
import os.path
lots = 0
last_values_json = "cache/<city>.json"
if os.path.isfile(last_values_json):
with open(last_values_json) as data_file: