Skip to content

Instantly share code, notes, and snippets.

Manjaro Linux xsettingsd notes

Install

pamac install xsettingsd

systemctl

The service is expected to be per-user as opposed to system-wide.
Include a --user arg when working with systemctl.

SteamNetworkingSockets() is returning nullptr

Problem: The SteamNetworkingSockets() call from the GameNetworkingSockets library is returning nullptr.

Fix: You are probably missing some initialization prior to that. Look at the function InitSteamDatagramConnectionSockets from the repo's example_chat.cpp:

static void InitSteamDatagramConnectionSockets()
{
	#ifdef STEAMNETWORKINGSOCKETS_OPENSOURCE
fn main() {
if std::env::args().count() != 2 {
panic!("Pass exactly 1 argument: an index");
}
let index = match std::env::args().nth(1).unwrap().parse::<usize>() {
Ok(i) => i,
Err(_) => panic!("Pass a non-negative integer"),
};
@Costava
Costava / How to install Frama-C on Manjaro Linux.md
Last active March 30, 2022 23:14
How to install Frama-C on Manjaro Linux

How to install Frama-C on Manjaro Linux

Author: github.com/Costava
Date: 2022 February
Manjaro version: Qonos 21.2.3 with Xfce

NOTE: If you want to do a "clean reinstall":

  • pamac remove opam ocaml ocaml-compiler-libs
  • Delete .opam directory and .why3.conf from your home directory.
  • Also delete .why3.conf.bak if present in home directory.
// gcc structpadding.c -std=c99 -Wall
#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>
typedef struct Foo1 {
uint64_t a;
} Foo1;
// gcc ArrayParamIsNotValueType.c -std=c99 -Wall
#include <stdio.h>
void DoFoo(int a[3]) {
a[0] = 77;
a[1] = 88;
}
int main(void) {
var count = -3;
document.addEventListener("keyup", function(e) {
if (e.code === 'Space') {
count += 1;
console.log(count);
}
});
// gcc ArrayParamStatic.c -std=c99 -g -Wall
// gcc (GCC) 11.1.0
#include <assert.h>
#include <stddef.h>
void
Bump(int a[const static 1]) {
a[0] += 1;
*a += 1;
// Output to stdout a solid red P3 .ppm image.
public class SolidRed {
public static void main(String args[]) {
int width = 100;
int height = 100;
int numPixels = width * height;
System.out.println("P3");
System.out.println(width + " " + height);
System.out.println("255");