Distant Horizons v2.0.0
(and up) shader compatibility information.
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
data class BarDataM(val value: Float, val label: String) | |
@Composable | |
fun BarChartComponent( | |
bars: List<BarDataM>, | |
barWidth: Dp, | |
spaceBetweenBars: Dp, | |
animateChart: Boolean | |
) { | |
var selectedBar by remember { mutableIntStateOf(-1) } |
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
# This version works with CF WAF (using zone rulesets) and obsoletes previous | |
# versions. This works will all CF account types. This action depends on curl | |
# and jp and will add/remove IPs from the $known_hostile_ips list. Creating the | |
# WAF rules need only be done once per zone. Creating the list need only be done | |
# once per account. | |
# | |
# Author: Bernard Dickens III (Xunnamius) | |
# | |
# Inspired by work from: Mike Rushton | |
# https://github.com/fail2ban/fail2ban/blob/master/config/action.d/cloudflare.conf |
Here are two queries that look up information about a pull request via GitHub's GraphQL API v4. The first looks up a pull request by number, the second looks up a pull request by ref (i.e. commit hash, branch name, tag name).
While it is trivial to use the RESTful v3 API to look up a pull request by number, the GraphQL API is the only way to do the same thing for an arbitrary reference in a single HTTP request.
These took a bit of trial and error in the GitHub's GraphQL Explorer and various support threads to get right, so I'm putting them up here for posterity.
gh api graphql --paginate \
--jq '.data.organization.repositories.nodes[] | .defaultBranchRef.name + "\t" + .name' \
-F org=SomeOrg \
-f query='
query($org:String!, $endCursor:String) {
organization(login:$org) {
repositories(first: 100, after: $endCursor, isFork:false, orderBy: {field:NAME, direction:ASC}) {
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.Windows; | |
using System.Windows.Controls; | |
namespace CustomControl | |
{ | |
public class BindablePasswordBox : Decorator | |
{ | |
/// <summary> | |
/// The password dependency property. | |
/// </summary> |
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
// app.js: register the route. In our case, we don't want authorization for this route | |
app.use('/healthcheck', require('./routes/healthcheck.routes')); | |
// healthcheck.routes.js: return a 2xx response when your server is healthy, else send a 5xx response | |
import express from 'express'; | |
const router = express.Router({}); | |
router.get('/', async (_req, res, _next) => { | |
// optional: add further things to check (e.g. connecting to dababase) |
sudo apt-get install tk-dev build-essential texinfo texi2html libcwidget-dev libncurses5-dev libx11-dev binutils-dev bison flex libusb-1.0-0 libusb-dev libmpfr-dev libexpat1-dev tofrodos subversion autoconf automake libtool mercurial
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; | |
/// <summary> | |
/// Small helper class to convert viewport, screen or world positions to canvas space. | |
/// Only works with screen space canvases. | |
/// </summary> | |
/// <example> | |
/// <code> | |
/// objectOnCanvasRectTransform.anchoredPosition = specificCanvas.WorldToCanvasPoint(worldspaceTransform.position); | |
/// </code> |
NewerOlder