This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off &title Multiple GUI choices via powershell snippet by AveYo &rem preview: https://i.imgur.com/JjazNR0.png | |
:: setup gui dialog choices | |
set all_choices=Option 1,Option 2,Option 3,Option4,Option5 | |
set def_choices=Option 1,Option 2,Option5 | |
:: Show gui dialog choices 1=title 2=all_choices 3=def_choices 4=output_variable | |
call :choices "Multiple GUI choices" "%all_choices%" "%def_choices%" CHOICES | |
:: Quit if no choice selected | |
if not defined CHOICES color 0c &echo ERROR! No choice selected.. &timeout /t 20 &color 07 &exit/b | |
:: Print choices | |
echo Choices: %CHOICES% & echo. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# https://github.com/BelkaDev/mustream | |
# Requires a running Spotify desktop client | |
check::network() { | |
[[ $? != 0 ]] && echo "Network error: couldn't reach server." && exit 1 | |
} | |
check::running() { | |
[[ -z $(pidof -s spotify) ]] && echo "Spotify is not running." && exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;---------------------------------------------------------------------------------- | |
; Error Handler | |
;---------------------------------------------------------------------------------- | |
(defun MI:Error (msg) | |
; Error guarding for when you pass Esc. | |
; Only works on English installs! | |
(if (not (member msg (list "Function cancelled" "quit / exit abort"))) | |
; if this is genuine error, code backtrace | |
(progn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ExecuteWithDelay.cs | |
// Author: Made Indrayana | |
// MIT License | |
// Delaying an execution of a UnityEvent with a variable wait time. | |
using System.Collections; | |
using UnityEngine; | |
using UnityEngine.Events; | |
public class ExecuteWithDelay : MonoBehaviour |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
timer0 = Timer.New() | |
Controls.OFF.EventHandler = function (valueChange) | |
if (Controls.OFF.Boolean) then | |
Controls.OFF.Color = "#F00" | |
timer0:Stop() | |
--Controls['Peak Out'].RampTime = 0.3 | |
Controls['Peak Out'].Value = -100 | |
--Controls['RMS Out'].RampTime = 1 | |
Controls['RMS Out'].Value = -100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2017 Google Inc. All rights reserved. | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, software | |
// distributed under the License is distributed on an "AS IS" BASIS, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using UnityEngine; | |
public static class Fade | |
{ | |
public static IEnumerator In (AudioSource audioSource, float fadeTime) | |
{ | |
const float startTime = 0f; | |
var currentTime = 0f; | |
audioSource.Play(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// LinearDecibelConverter.cs | |
// Author: Made Indrayana | |
// MIT License | |
// Small utilities to convert Linear value (0-1) to dB and vice versa | |
public class LinearDecibelConverter | |
{ | |
public float LinearToDecibel(float linear) | |
{ | |
float dB; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ReadOnlyAttribute.cs | |
// Author: Made Indrayana | |
// MIT License | |
// Variables with this attribute will be shown in Inspector but will be grayed out and not editable. | |
using UnityEngine; | |
public class ReadOnlyAttribute : PropertyAttribute { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// main.cpp | |
// Reference and Co. | |
// Author: Made Indrayana | |
// MIT License | |
// This program is created to display the usage of pass-by-value, pass-by-reference and pointer in C++. | |
#include <iostream> | |
using namespace std; | |
NewerOlder