| command | description |
|---|---|
| ctrl + a | Goto BEGINNING of command line |
| UNITY_MATRIX_IT_MV[0].xyz = ??? | |
| UNITY_MATRIX_IT_MV[1].xyz = Camera Up | |
| UNITY_MATRIX_IT_MV[2].xyz = Camera Forward | |
| float3 forward = -normalize(UNITY_MATRIX_V._m20_m21_m22); | |
| cameraFwd = -unity_MatrixInvV._m02_m12_m22; | |
| float3 up = normalize(UNITY_MATRIX_V._m10_m11_m12); | |
| float3 right = normalize(UNITY_MATRIX_V._m00_m01_m02); | |
| float3 cameraUp = unity_CameraInvProjection[1].xyz; |
To rename your Git master branch to main, you must do the following steps:
-
Navigate to your repository in the command line and issue the following commands: -
git branch -m master main-git push -u origin main -
Change your default branch on GitHub by going to your GitHub repository in your browser, and navigate to
Settings > Branchesand click on the dropdown and switch frommastertomainand clickUpdate(this will only show if you have two or more branches). Themainbranch is now your default branch. -
Update the tracking of the branch from your command line with the following command: -
git branch -u origin/main main
In August 2007 a hacker found a way to expose the PHP source code on facebook.com. He retrieved two files and then emailed them to me, and I wrote about the issue:
http://techcrunch.com/2007/08/11/facebook-source-code-leaked/
It became a big deal:
http://www.techmeme.com/070812/p1#a070812p1
The two files are index.php (the homepage) and search.php (the search page)
With the addition of ES modules, there's now no fewer than 24 ways to load your JS code: (inline|not inline) x (defer|no defer) x (async|no async) x (type=text/javascript | type=module | nomodule) -- and each of them is subtly different.
This document is a comparison of various ways the <script> tags in HTML are processed depending on the attributes set.
If you ever wondered when to use inline <script async type="module"> and when <script nomodule defer src="...">, you're in the good place!
Note that this article is about <script>s inserted in the HTML; the behavior of <script>s inserted at runtime is slightly different - see Deep dive into the murky waters of script loading by Jake Archibald (2013)
| #!/bin/bash | |
| # Sometimes you need to move your existing git repository | |
| # to a new remote repository (/new remote origin). | |
| # Here are a simple and quick steps that does exactly this. | |
| # | |
| # Let's assume we call "old repo" the repository you wish | |
| # to move, and "new repo" the one you wish to move to. | |
| # | |
| ### Step 1. Make sure you have a local copy of all "old repo" | |
| ### branches and tags. |
| /* | |
| (c) by Thomas Konings | |
| Random Name Generator for Javascript | |
| */ | |
| function capFirst(string) { | |
| return string.charAt(0).toUpperCase() + string.slice(1); | |
| } | |
| function getRandomInt(min, max) { |
| # Copyright (c) 2019 Will Bender. All rights reserved. | |
| # This work is licensed under the terms of the MIT license. | |
| # For a copy, see <https://opensource.org/licenses/MIT>. | |
| # Very fast __git_ps1 implementation | |
| # Inspired by https://gist.github.com/wolever/6525437 | |
| # Mainly this is useful for Windows users stuck on msys, cygwin, or slower wsl 1.0 because git/fs operations are just slower | |
| # Caching can be added by using export but PROMPT_COMMAND is necessary since $() is a subshell and cannot modify parent state. | |
| # Linux: time __ps1_ps1 (~7ms) |
| /* ---------------------------------------------------------- */ | |
| /* */ | |
| /* A media query that captures: */ | |
| /* */ | |
| /* - Retina iOS devices */ | |
| /* - Retina Macs running Safari */ | |
| /* - High DPI Windows PCs running IE 8 and above */ | |
| /* - Low DPI Windows PCs running IE, zoomed in */ | |
| /* - Low DPI Windows PCs and Macs running Firefox, zoomed in */ | |
| /* - Android hdpi devices and above */ |
