For example, you want to set 40% alpha transparence to #000000
(black color), you need to add 66
like this #66000000
.
Discover gists
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
import androidx.compose.foundation.layout.Box | |
import androidx.compose.runtime.Composable | |
import androidx.compose.ui.Modifier | |
import androidx.compose.ui.draw.drawWithContent | |
import androidx.compose.ui.geometry.Offset | |
import androidx.compose.ui.graphics.BlendMode | |
import androidx.compose.ui.graphics.Color | |
import androidx.compose.ui.graphics.nativeCanvas | |
@Composable |
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
<?php | |
/** | |
* Keep pre-existing members on their initial checkout price when manually renewing. Grandfather 'old' members when their levels pricing changes. | |
* Note: This is not needed for recurring membership levels and is designed for levels with an expiration date. | |
* | |
* You can add this recipe to your site by creating a custom plugin | |
* or using the Code Snippets plugin available for free in the WordPress repository. | |
* Read this companion article for step-by-step directions on either method. | |
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ |
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
{ | |
"last_node_id": 25, | |
"last_link_id": 41, | |
"nodes": [ | |
{ | |
"id": 4, | |
"type": "Width/Height Literal", | |
"pos": [ | |
-209, | |
451 |
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 System; | |
using UnityEngine; | |
public static class RandomExtension | |
{ | |
public static int ProceedValue(float random, RandomData[] data) | |
{ | |
var cumulativeSumArray = new float[data.Length]; | |
cumulativeSumArray[0] = data[0].chance; | |
for (int i = 1; i < cumulativeSumArray.Length; ++i) |
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
# Just some notes on enabling smart http with nginx as well as authentication on push for repos | |
# install git, cgit and apache2-utils (for authentication) | |
apt install git cgit apache2-utils fcgiwrap | |
# create a git user | |
adduser git | |
su git | |
cd | |
mkdir .ssh && chmod 700 .ssh | |
touch .ssh/authorized_keys && chmod 600 .ssh/authorized_keys |
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
<head> | |
<meta property="og:image" content="GifToEmbedURL"> # Change the content to the link of a gif of your choice, which will be shown as the embed. | |
<meta property="og:type" content="video.other"> | |
<meta property="og:video:url" content="VideoToEmbedURL"> # Change the content to the link of a video of your choice. Will work with videos over 50 MB, and even unsupported codecs such as AV1! | |
<meta property="og:video:width" content="1920"> # Set this to the video's width and height, not required, but will show the video as intended if the aspect ratio and size is correct. | |
<meta property="og:video:height" content="1080"> | |
</head> |
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
// An object of Kelly's 22 colors, converted from rjurney's array | |
// Color names are camelCase, and 'ish' was removed from all | |
// The two-name colors have an alternate name as well, such as: | |
// example: orangeYellow lightOrange manilla is "#e1a11a" | |
// As for "maximum contrast", I do not endorse that claim | |
// theory - https://eleanormaclure.files.wordpress.com/2011/03/colour-coding.pdf (page 5) | |
// kelly's colors - https://i.kinja-img.com/gawker-media/image/upload/1015680494325093012.JPG | |
// hex values - http://hackerspace.kinja.com/iscc-nbs-number-hex-r-g-b-263-f2f3f4-242-243-244-267-22-1665795040 |
NewerOlder