Discover gists
#define MIN(a,b) ((a)<(b)?(a):(b)) | |
#define MAX(a,b) ((a)>(b)?(a):(b)) | |
typedef struct rgb { | |
float r, g, b; | |
} RGB; | |
typedef struct hsl { | |
float h, s, l; | |
} HSL; |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
- Follow standard conventions.
- Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
- Boy scout rule. Leave the campground cleaner than you found it.
- Always find root cause. Always look for the root cause of a problem.
Ref: http://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.7.6.2.html#sect_C.7.6.2.1.1
The Image Orientation (Patient) dicom tag is (0020,0037)
, and is defined as 6 elements: "Ax, Ay, Az, Bx, By, Bz"
.
When described as a 3x3 rotation matrix R
, it's equivalent to:
Ax Bx Cx
Recently i bought a zuoya gmk67 keyboard, it doesn't have a function keys row and has a knob for volume control. Unfortunately, if you plug your gmk67 in a archlinux machine you will notice that using fn+1
will not produce f1
as expected, it will produce a screen brightness decrease, and if you change the physical switch in the back for the macOS mode, the function keys now work, but the modifier keys don't, quite stressful.
Fear not, you can either alter your system configuration so the keyboard functions normally, as in this gist, or remap the keys, as seen in the gist Using GMK67 keyboard in linux with key remaps!.
For this gist we are going to alter the configuration for the apple hid driver on archlinux, since this keyboard uses it, and alter the functionality of the Fn key.
This is tested on archlinux, for any other distro you might have to figure out yourself the correponding commands!
-- place in ~/.config/wireshark/plugins/ | |
local p_xrce_dds = Proto("xrce-dds", "XRCE-DDS"); | |
local p_xrce_dds_header = Proto("xrce-dds-header", "Header"); | |
local p_xrce_dds_submessage = Proto("xrce-dds-submessage", "Submessage"); | |
local f_sessionId = ProtoField.uint8("xrce-dds.sessionId", "sessionId", base.HEX) | |
local f_streamId = ProtoField.uint8("xrce-dds.streamId", "streamId", base.HEX) | |
local f_sequenceNr = ProtoField.uint16("xrce-dds.sequenceNr", "sequenceNr", base.DEC) | |
local f_clientKey = ProtoField.uint32("xrce-dds.clientKey", "clientKey", base.HEX) |
const gallery = Object.values(import.meta.glob('@assets/*.{png,jpg,jpeg,PNG,JPEG}', { eager: true, as: 'url' })) |
WSA or Windows Subsystem for Android is a Tool that allows Windows to run Android Apps directly without using any emulator. The problem is Windows Subsystem for Android is currently only available through preview via the Beta Channel of the Windows Insider Program. But if you follow this guide, you don't have to be in Windows Insider Program to try it out. The only thing you need is Windows 11 installed and some patience.
- A Device with any version and Edition of Windows 11 installed.
- Internet Connection.
- Hyper-V enabled.
pihole comes with it's own lightweight DNS server called FTL. It's geared towards easy of use. Even so, setting up this feature can be hard. Here are some lessons I've learned.
In this example:
- Your network is setup on 192.168.1.0/24
- 192.168.1.1 is your DHCP server and IP gateway. (usually your router)
- 192.168.1.254 is the host running pi-hole
name: Create diff on updated HelmReleases | |
on: | |
pull_request: | |
branches: | |
- master | |
paths: | |
- "clusters/**.yaml" | |
env: |