Skip to content

Instantly share code, notes, and snippets.

View daltonbr's full-sized avatar
🎮
Brighton - UK

Dalton Lima daltonbr

🎮
Brighton - UK
View GitHub Profile
version: "3"
networks:
default:
driver: macvlan
driver_opts:
parent: enp7s0
ipam:
config:
- subnet: 192.168.1.0/24
@oktomus
oktomus / MaximizeStandaloneWindow.cs
Created July 31, 2020 13:25
Maximize Unity standalone window
using System;
using System.Text;
using System.Runtime.InteropServices;
using System.Text.RegularExpressions;
using UnityEngine;
using System.Diagnostics;
/// <summary>
/// Source : https://improve.dk/minimizing-and-maximizing-windows/
/// </summary>
@thomasmaurer
thomasmaurer / settings.json
Last active March 27, 2023 03:34
My Windows Terminal Settings settings.json February 2021
// This file was initially generated by Windows Terminal 1.3.2651.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
@JohannesDeml
JohannesDeml / README.md
Last active September 16, 2023 01:55
Remove Unity mobile notification warning for WebGL builds

Remove warning

Unity shows the following warning on mobile devices up to Unity 2019.4: "Please note that Unity WebGL is not currently supported on mobiles. Press OK if you wish to continue anyway." This script helps you remove this warning

Live example

To see live examples see Unity Web GL Loading Test

Logic

The script will run after the build has completed and replace the checks from all generated javascript files.

Support

@De-Panther
De-Panther / UnityLoaderCompatibilityCheck.js
Last active February 27, 2021 00:42
Unity WebGL on mobile - Code snippet for patching UnityLoader.compatibilityCheck() so it won't show popup message on mobile. Works in Unity 2018 and 2019. Unity 2020 switched templates and don't need it.
UnityLoader.compatibilityCheck = function (unityInstance, onsuccess, onerror) {
if (!UnityLoader.SystemInfo.hasWebGL) {
unityInstance.popup('Your browser does not support WebGL',
[{text: 'OK', callback: onerror}]);
} else {
onsuccess();
}
}
// now you can call ... var unityInstance = UnityLoader.instantiate( ...
using System;
using System.IO;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using UnityEngine;
using UnityEditor;
#if ENABLE_VSTU
@daltonbr
daltonbr / InventoryItemDisplay.cs
Last active December 13, 2017 03:28
A basic structure of a Delegate in C#
public class InventoryItemDisplay
{
public delegate void InventoryItemDisplayDelegate(InventoryItem item); // the signature of this delegate <void> <param item>
public static event InventoryItemDisplayDelegate onClick; // the event
public void Click()
{
Debug.Log("Clicked " + item.displayName);
if (onClick != null) // Important null check - if no one subscribes to this event, then it crashes.
{
@mrbar42
mrbar42 / README.md
Last active May 22, 2024 19:05
bash scripts to create VOD HLS stream with ffmpeg almighty (tested on Linux and OS X)

running:

bash create-vod-hls.sh beach.mkv

will produce:

    beach/
      |- playlist.m3u8
 |- 360p.m3u8
@mattiaswargren-zz
mattiaswargren-zz / PostProcessXCodeComplianceFix.cs
Created August 30, 2017 14:30
Unity ITSAppUsesNonExemptEncryption export compliance Post Process
#if UNITY_IOS
using UnityEditor.Callbacks;
using UnityEditor;
using UnityEditor.iOS.Xcode;
using System.IO;
public class PostProcessXCodeComplianceFix
{
[PostProcessBuild]
public static void ChangeXcodePlist(BuildTarget buildTarget, string pathToBuiltProject)
@SheldonWangRJT
SheldonWangRJT / Convert .mov or .MP4 to .gif.md
Last active May 22, 2024 02:05
Convert Movie(.mov) file to Gif(.gif) file in one command line in Mac Terminal

This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.

Need

Convert .mov/.MP4 to .gif

Reason

As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.

This is not limited to developer, anyone has this need can use this method to convert the files.