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 | |
# PM2 Startup script | |
# Source: https://0x0a14.de/pm2-startup-script-for-freebsd/ | |
# Made by: Johannes Tonn | |
# | |
# Download this file | |
# cd /usr/local/etc/rc.d && fetch https://gist.github.com/457769f2090c6b69cd9d | |
# | |
# Make the file executable with: |
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
/** | |
* Merges a hexidecimal colour with a 0-1 alpha value and returns a new hexidecimal colour. | |
* | |
* @param Input ARGB colour that alpha will be applied to. Eg: 0xFFFFFFFF (32bit ARGB). | |
* @param Alpha value will be applied to colour. 0 (fully transparent) to 1 (fully opaque). | |
* @return Returns a new ARGB hexidecimal incorporating alpha. | |
*/ | |
public static function mergeAlpha(colour:Int, alpha:Float):Int | |
{ | |
// Bitwise hex extraction. |
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
/** | |
* Merges two 32bit hexadecimal colours, and returns the result. | |
* | |
* @param First hexadecimal ARGB colour. | |
* @param Second hexadecimal ARGB colour. | |
* @return Returns the two colours blended as a hexadecimal ARGB value. | |
*/ | |
public static function blendColours(colourA:Int, colourB:Int):Int | |
{ | |
// Bitwise hex extraction... |