Skip to content

Instantly share code, notes, and snippets.

View ArsenArsen's full-sized avatar

Arsen Arsenović ArsenArsen

View GitHub Profile
@iains
iains / gist:140cf56f4524fe561d8d6bebfa9984b1
Created October 8, 2022 19:11
debugging stuff for GCC coroutines.cc
/* ================= Debug. ================= */
#include "cxx-pretty-print.h"
extern void debug_tree (tree);
void
coro_dump_frame (tree fr)
{
gcc_checking_assert (TREE_CODE (fr) == RECORD_TYPE);
@thesamesam
thesamesam / gentoo-crossdev.md
Last active April 24, 2024 13:01
Gentoo cross compilation instructions (crossdev -> stage3)

Cross instructions

These instructions cover:

  1. building a cross toolchain
  2. populating the new ROOT
  3. making it chrootable using qemu-user to easily run "native" builds or tests (this is like a stage3 at the end)

You do not need to follow through to the end if you don't need a stage3-like root.

Set up the toolchain

@mikaelhg
mikaelhg / 01_pkcs12-cacerts-workaround.sh
Last active August 4, 2023 06:01
Workaround for java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
# Ubuntu 18.04 and various Docker images such as openjdk:9-jdk throw exceptions when
# Java applications use SSL and HTTPS, because Java 9 changed a file format, if you
# create that file from scratch, like Debian / Ubuntu do.
#
# Before applying, run your application with the Java command line parameter
# java -Djavax.net.ssl.trustStorePassword=changeit ...
# to verify that this workaround is relevant to your particular issue.
#
# The parameter by itself can be used as a workaround, as well.
#!/bin/bash
# export DBUS_SESSION_BUS_ADDRESS environment variable because cron hates me
PID=$(pgrep -u USER gnome-session-b)
export DBUS_SESSION_BUS_ADDRESS=$(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$PID/environ|cut -d= -f2-)
/usr/bin/gsettings set org.gnome.shell.extensions.user-theme name 'Flat-Plat'
/usr/bin/gsettings set org.gnome.desktop.interface gtk-theme 'Flat-Plat'
/usr/bin/gsettings set org.gnome.desktop.background picture-uri 'file://WALLPAPER-PATH'
/usr/bin/gsettings --schemadir ~/.local/share/gnome-shell/extensions/drop-down-terminal@gs-extensions.zzrough.org set org.zzrough.gs-extensions.drop-down-terminal background-color 'rgb(69,90,100)'
@rumpelsepp
rumpelsepp / install-pacaur.sh
Last active November 20, 2022 13:04
A small script for arch linux which builds and installs "pacaur" automatically
#!/usr/bin/bash -l
#
# The MIT License (MIT)
#
# Copyright (c) 2015-2017 Stefan Tatschner
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell