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 UnityEngine; | |
namespace Ditzelgames | |
{ | |
public static class PhysicsHelper | |
{ | |
public static void ApplyForceToReachVelocity(Rigidbody rigidbody, Vector3 velocity, float force = 1, ForceMode mode = ForceMode.Force) | |
{ | |
if (force == 0 || velocity.magnitude == 0) |
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
These commands are based on a askubuntu answer http://askubuntu.com/a/581497 | |
To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below. | |
USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING. | |
ABSOLUTELY NO WARRANTY. | |
If you are still reading let's carry on with the code. | |
sudo apt-get update && \ | |
sudo apt-get install build-essential software-properties-common -y && \ | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \ |
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
//Now with less jquery | |
//1) go to your my-list page, and scroll to the bottom to make sure it's all loaded: | |
//http://www.netflix.com/browse/my-list | |
//2) Next, paste this in your developer tools console and hit enter: | |
[...document.querySelectorAll('.slider [aria-label]')].map(ele => ele.getAttribute('aria-label')) | |
//or use this to copy the list to your clipboard: | |
copy([...document.querySelectorAll('.slider [aria-label]')].map(ele => ele.getAttribute('aria-label'))) |
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
object HexBytesUtil { | |
def hex2bytes(hex: String): Array[Byte] = { | |
if(hex.contains(" ")){ | |
hex.split(" ").map(Integer.parseInt(_, 16).toByte) | |
} else if(hex.contains("-")){ | |
hex.split("-").map(Integer.parseInt(_, 16).toByte) | |
} else { | |
hex.sliding(2,2).toArray.map(Integer.parseInt(_, 16).toByte) | |
} |