This gist aims to facilitate the switching from bash to zsh as our defaut shell.
We will be using oh-my-zsh with the powerful theme: Powerlevel9k. You will find all the links below.
This process applies mainly for Arch Linux, but can be setup for any other distro (in theory :)).
I'm also using Gnome Terminal and pacaur as package manager.
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
| func get_all_files(path: String, file_ext := "", files := []): | |
| var dir = Directory.new() | |
| if dir.open(path) == OK: | |
| dir.list_dir_begin(true, true) | |
| var file_name = dir.get_next() | |
| while file_name != "": | |
| if dir.current_is_dir(): |
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 System; | |
| using UnityEngine; | |
| public class RandomPointInCollider | |
| { | |
| Collider2D collider; | |
| Vector3 minBound; | |
| Vector3 maxBound; | |
| int maxAttempts; |
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
| #!/bin/sh | |
| if pwd | grep /mnt/c > /dev/null; then | |
| exec git.exe "$@" | |
| else | |
| exec /usr/bin/git "$@" | |
| fi |
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
| // NOTE DONT put in an editor folder! | |
| using UnityEngine; | |
| public class AutohookAttribute : PropertyAttribute | |
| { | |
| } |
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
| // When creating shaders for Universal Render Pipeline you can you the ShaderGraph which is super AWESOME! | |
| // However, if you want to author shaders in shading language you can use this teamplate as a base. | |
| // Please note, this shader does not necessarily match perfomance of the built-in URP Lit shader. | |
| // This shader works with URP 7.1.x and above | |
| Shader "Universal Render Pipeline/Custom/Physically Based Example" | |
| { | |
| Properties | |
| { | |
| // Specular vs Metallic workflow | |
| [HideInInspector] _WorkflowMode("WorkflowMode", Float) = 1.0 |
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 UnityEditor; | |
| using UnityEngine; | |
| namespace com.hololabs.editor | |
| { | |
| public class FindByGuid : EditorWindow | |
| { | |
| [MenuItem("Utility/Find Asset by Guid %&g")] | |
| public static void DoFindByGuidMenu() | |
| { |
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 System.Collections.Generic; | |
| using System.IO; | |
| using System.Collections; | |
| using UnityEditor; | |
| using UnityEngine; | |
| using System; | |
| using System.Threading; | |
| public class Utilities : EditorWindow | |
| { |
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
| To make Pageant automatically run and load keys at startup: | |
| - Find the location of pageant.exe | |
| - Windows key + R to open the 'run' dialog box | |
| - Type: 'shell:startup' in the dialog box | |
| - Create a shortcut to the pageant.exe and put into this startup folder. |
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
| Have you seen Matthew Inman's (The Oatmeal) comic about why he runs? It's | |
| a classic. In it he talks about his inspiration for taking up long-distance | |
| running. He imagines his tendency to slack off and sit on the couch as a little | |
| creature he calls "The Blerch". It follows him around, tempting him to stop | |
| moving and scarf down junk food. | |
| I run too, though nothing close to the distances Inman runs. In my experience, | |
| refactoring as a skill has a lot in common with running or any other athletic | |
| sport. You can exercise your refactoring muscles, by deliberately working | |
| through the steps with discipline, like we talked about in the last email. As |
NewerOlder