This file contains hidden or 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
std::chrono::time_point<std::chrono::high_resolution_clock> p1; | |
std::chrono::time_point<std::chrono::high_resolution_clock> p2; | |
std::string tag; | |
#define START_PROFILE(t) tag = t; cout << "start " << tag << std::endl; p1 = std::chrono::high_resolution_clock::now(); | |
#define END_PROFILE() p2 = std::chrono::high_resolution_clock::now(); cout << "end " << tag << " " << std::chrono::duration<double, std::milli>(p2 - p1).count() << std::endl; |
This file contains hidden or 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 UnityEngine; | |
using UnityEngine.UI; | |
public class ShowNumberOfCanvasChildren : MonoBehaviour | |
{ | |
private GameObject _canvas; | |
private Text _childText; | |
private void Start() | |
{ |
This file contains hidden or 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 UnityEngine; | |
using UnityEngine.UI; | |
public class ShowNumberOfCanvasChildren : MonoBehaviour | |
{ | |
[SerializeField] private GameObject _canvas; | |
[SerializeField] private Text _numChildrenText; | |
private void Update() | |
{ |
This file contains hidden or 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 UnityEngine; | |
using UnityEngine.UI; | |
public class ShowNumberOfCanvasChildren : MonoBehaviour | |
{ | |
public GameObject Canvas; | |
public Text NumChildrenText; | |
private void Update() | |
{ |
This file contains hidden or 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
def foo(a, b): | |
print(a + b) | |
return 5 |
This file contains hidden or 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
$HEADER$namespace $NAMESPACE$ | |
{ | |
/// <summary> | |
/// PLEASE ADD DOCUMENTATION FOR THIS CLASS. | |
/// | |
/// Author: $AUTHOR$ | |
/// Date: $DATE$ | |
/// </summary> | |
public class $CLASS$ {$END$} | |
} |
This file contains hidden or 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 UnityEngine; | |
/// <summary> | |
/// PLEASE ADD DOCUMENTATION FOR THIS CLASS. | |
/// | |
/// Author: $AUTHOR$ | |
/// Date: $DATE$ | |
/// </summary> | |
public class $CLASS$ : MonoBehaviour {$END$} |
This file contains hidden or 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
(defmacro defn-defaults [name args body] | |
"Create a function that can provide default values for arguments. | |
Arguments that are optional should be placed in a hash as the | |
last argument with their names mapped to their default values. | |
When invoking the function, :<optional-argument-name> <value> | |
specifies the value the argument should take on." | |
(if (map? (last args)) |
This file contains hidden or 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
# NAVIGATION | |
function gop | |
cd ~/code/personal | |
if test (count $argv) != 0 | |
cd $argv | |
end | |
end |
This file contains hidden or 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
set tabstop=2 | |
set autoindent | |
set expandtab | |
set shiftwidth=2 | |
set clipboard+=unnamed | |
set tw=80 | |
set cursorline | |
set nostartofline | |
set background=dark | |
set shell=/bin/bash |
NewerOlder