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
/* Original code[1] Copyright (c) 2022 Shane Celis[2] | |
Licensed under the MIT License[3] | |
[1]: https://gist.github.com/shanecelis/b6fb3fe8ed5356be1a3aeeb9e7d2c145 | |
[2]: https://twitter.com/shanecelis | |
[3]: https://opensource.org/licenses/MIT | |
*/ | |
using UnityEngine; | |
using UnityEngine.UIElements; |
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
use std::fmt::Debug; | |
use std::iter::FromIterator; | |
/// Try to collect from an iterator that may fail. | |
/// | |
/// # Motivation | |
/// | |
/// I really wanted to be able to turn a `Iterator<Item = u8>` into a String | |
/// more easily. | |
/// |
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
/* Original code[1] Copyright (c) 2022 Shane Celis[2] | |
Licensed under the MIT License[3] | |
[1]: https://gist.github.com/shanecelis/f0e295b12ec1ab09f67ad5980ac9b324 | |
[2]: https://twitter.com/shanecelis | |
[3]: https://opensource.org/licenses/MIT | |
*/ | |
using System; | |
using System.Collections.Generic; |
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 -e | |
# unity-log | |
usage() { | |
echo "Usage: unity-log [-te] <Company> <Application>" >&2; | |
echo " -t tail log" >&2; | |
echo " -e editor log" >&2; | |
exit 2; | |
} | |
cmd=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
;; convenience-lambda.scm | |
;; | |
;; This syntax was inspired by arc and Clojure's anonymous procedure | |
;; syntax. | |
;; | |
;; #.\ (+ %1 %2) -> (lambda (%1 %2) (+ %1 %2)) | |
;; #.\ (+ % %%) -> (lambda (% %%) (+ % %%)) | |
;; | |
;; The .\ is supposed to approximate the lowercase lambda character in | |
;; ascii. |
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
/* Original code[1] Copyright (c) 2022 Shane Celis[1] | |
Licensed under the MIT License[1] | |
[1]: https://gist.github.com/shanecelis/1ab175c46313da401138ccacceeb0c90 | |
[1]: https://twitter.com/shanecelis | |
[1]: https://opensource.org/licenses/MIT | |
*/ | |
using UnityEngine.Scripting; | |
using UnityEngine.UIElements; |
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
# feature: Add beta sequence. | |
# ^-----^ ^----------------^ | |
# | | | |
# | +-> Summary in present tense sentence. | |
# | | |
# +-------> Type: binary, chore, doc, excise, feature, fix, hack, legal, refactor, | |
# style, or test. |
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
/* | |
@title: Befungoban | |
@author: Shane Celis @shanecelis | |
https://esolangs.org/wiki/Befunge | |
http://qiao.github.io/javascript-playground/visual-befunge93-interpreter/ | |
*/ | |
const player = "p"; | |
const selection = "b"; |
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
/* | |
Original code Copyright (c) 2011 cdiggins[1] | |
Modified code Copyright (c) 2016 Shane Celis, @shanecelis[2] | |
Licensed under the CC-BY-SA 3.0[3] | |
Original code posted to this question[4] and answer[5] from | |
stackoverflow.com where user contributions are licensed under | |
CC-BY-SA 3.0 with attribution required. |
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 UIElements and want to use UIToolkit's progress bar at runtime? Hope, | |
you're using Unity 2021.1 or later. If you aren't, you can expose the | |
progress bar in Unity 2020.3 and perhaps even earlier versions (not tested). | |
`com.unity.ui v1.0.0-preview.18` uses the following #ifdef for the | |
`ProgressBar` class[1]: | |
``` | |
#if !UIE_PACKAGE || UNITY_2021_1_OR_NEWER | |
``` |
NewerOlder