| command | description |
|---|---|
| ctrl + a | Goto BEGINNING of command line |
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
| @mixin equal-grid-columns($columns, $gap, $el) { | |
| @include clearfix; | |
| > #{$el} { | |
| float: left; | |
| width: (100% / $columns); | |
| $halfGap: ($gap / 2); | |
| padding: 0 $halfGap; | |
| margin-top: $gap; | |
| @for $i from 1 through $columns { |
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
| /* | |
| (c) by Thomas Konings | |
| Random Name Generator for Javascript | |
| */ | |
| function capFirst(string) { | |
| return string.charAt(0).toUpperCase() + string.slice(1); | |
| } | |
| function getRandomInt(min, max) { |
- For your local dev, create a
Dockerfilethat is based on your production image and simply installxdebuginto it. Exemple:
FROM php:5
RUN yes | pecl install xdebug \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
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
| 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; |
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
| get_latest_release() { | |
| curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api | |
| grep '"tag_name":' | # Get tag line | |
| sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value | |
| } | |
| # Usage | |
| # $ get_latest_release "creationix/nvm" | |
| # v0.31.4 |
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
| # import config. | |
| # You can change the default config with `make cnf="config_special.env" build` | |
| cnf ?= config.env | |
| include $(cnf) | |
| export $(shell sed 's/=.*//' $(cnf)) | |
| # import deploy config | |
| # You can change the default deploy config with `make cnf="deploy_special.env" release` | |
| dpl ?= deploy.env | |
| include $(dpl) |
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
| // quaternion code from https://github.com/stackgl/gl-quat | |
| // rotation from https://twistedpairdevelopment.wordpress.com/2013/02/11/rotating-a-vector-by-a-quaternion-in-glsl/ | |
| precision mediump float; | |
| uniform mat4 projection, view; | |
| uniform vec3 translate; | |
| uniform vec3 scale; | |
| attribute vec3 normal; |
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 System.Collections; | |
| /// <summary> | |
| /// Override the texture of each of the parts with your texture. | |
| /// </summary> | |
| public class OverrideControllerTexture : MonoBehaviour | |
| { | |
| #region Public variables | |
| [Header("Variables")] |
