This is a short tutorial on using podman to run X11 applications. This need often arises when one has to run X11 applications on distros such as Silverblue, when the application for instance has no Flatpak and one doesn't want to install the particular app on their host OS (for instance for Silverblue this process would result in the need to layer a package and then reboot, something which understandably would get quite irritating after a while).
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
def findNearestExit(from: EnumFacing): BlockPos = { | |
val possibleDirections: mutable.Set[EnumFacing] = mutable.Set.empty[EnumFacing] | |
for (dir <- EnumFacing.values()){ | |
if (dir != from && hasTileEntityIn(worldObj, pos.offset(dir)) && worldObj.getTileEntity(pos.offset(dir)).isInstanceOf[IFluidHandler]) possibleDirections += dir | |
} | |
if (possibleDirections.isEmpty) return null | |
var destinationBlockPos: BlockPos = null |
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
[18:10:12] [Client thread/ERROR] [FML]: Fatal errors were detected during the transition from PREINITIALIZATION to INITIALIZATION. Loading cannot continue | |
[18:10:12] [Client thread/ERROR] [FML]: | |
States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored | |
UCH mcp{9.19} [Minecraft Coder Pack] (minecraft.jar) | |
UCH FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.8.9-11.15.1.1758.jar) | |
UCH Forge{11.15.1.1758} [Minecraft Forge] (forgeSrc-1.8.9-11.15.1.1758.jar) | |
UCH fluidcraft{1.0} [fluidcraft] (bin) | |
UCH Waila{1.6.0} [Waila] (Waila-1.6.0-B3_1.8.8.jar) | |
UCH JEI{2.8.3.39} [Just Enough Items] (jei_1.8.8-2.8.3.39.jar) | |
UCE rftools{4.22beta25} [RFTools] (rftools-1.8.9-4.22beta25.jar) |
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 java.lang.invoke.MethodHandles; | |
import java.lang.invoke.MethodHandle; | |
import java.lang.invoke.MethodHandles.Lookup; | |
public class MethodHandleExample { | |
private static final MethodHandle barGetter; | |
private static final MethodHandle barSetter; | |
static { | |
Field barField = null; |
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
const uint16_t val_1 = (1 << 0); | |
const uint16_t val_2 = (1 << 8); | |
const uint16_t val_3 = (1 << 1); | |
const uint16_t val_4 = (1 << 9); | |
const uint16_t val_5 = (1 << 2); | |
const uint16_t val_6 = (1 << 10); | |
const uint16_t val_7 = (1 << 3); | |
const uint16_t val_8 = (1 << 11); | |
const uint16_t val_9 = (1 << 4); |
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
#include <inttypes.h> | |
#include <stdio.h> | |
void main(void) | |
{ | |
uint16_t low_short = (union{uint16_t shorts[2];uint32_t i;}) | |
{.i = 0xDEADBEEF}.shorts[0]; | |
printf("0x%"PRIX16"\n", low_short); | |
} |
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
#!/usr/bin/env bash | |
output_file="${HOME}/found_empty.txt" | |
# For user convenience. If the user runs this using `sudo`, | |
# the file shall be within their own home directory, instead | |
# of the root's. | |
# | |
# We shall also create the file and make its ownership make sense | |
# for the user. |
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
#!/bin/sh | |
usage() { | |
printf "Usage: %s [options]\n" "${0}" | |
echo "" | |
echo "Options: " | |
printf " --help or -h " | |
echo "Display this help message" | |
printf " --prefix=PREFIX " | |
echo "Top level install directory is PREFIX [default /usr/local]" |
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
(defun matrix-* (a b) | |
(let ((ret (make-array '(3 3)))) | |
(loop for i from 0 to 2 do | |
(loop for j from 0 to 2 do | |
(setf (aref ret i j) | |
(loop for k from 0 to 2 | |
summing (* (aref a i k) (aref b k j)))))) | |
ret)) | |
(defconstant +identity+ (make-array |
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 (scheme base) | |
(scheme write)) | |
(define-syntax destructuring-bind | |
(syntax-rules () | |
((_ (name1 names ...) var body1 bodys ...) | |
(apply | |
(lambda (name1 names ...) | |
body1 bodys ...) | |
var)))) |
OlderNewer