Skip to content

Instantly share code, notes, and snippets.

View jsm222's full-sized avatar

Jesper Schmitz Mouridsen jsm222

View GitHub Profile
#include <sys/ioctl.h>
#include <unistd.h>
#include <sys/consio.h>
#include <fcntl.h>
int main() {
int fd = open("/dev/console", O_WRONLY | O_NOCTTY);
ioctl(fd,VT_ACTIVATE,3);
close(fd);
}
@jsm222
jsm222 / mscore.patch
Created February 5, 2024 22:55
mscore use libxml2 directly in qt6
diff --git a/src/importexport/musicxml/CMakeLists.txt b/src/importexport/musicxml/CMakeLists.txt
index f9882fb776..1e06776c65 100644
--- a/src/importexport/musicxml/CMakeLists.txt
+++ b/src/importexport/musicxml/CMakeLists.txt
@@ -19,9 +19,11 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
set(MODULE iex_musicxml)
-
set(MODULE_QRC musicxml.qrc)
--- src/ck-sysdeps-unix.c.orig 2022-08-26 23:08:43 UTC
+++ src/ck-sysdeps-unix.c
@@ -328,7 +328,7 @@ ck_get_a_console_fd (void)
}
#endif
-
+#if 0
#ifdef _PATH_TTY
fd = ck_open_a_console (_PATH_TTY);
thr_self(0xffffffffaf80) = 0 (0x0)
SIGNAL 4 (SIGILL) code=ILL_ILLTRP trapno=0 addr=0x1e93ed813000
sigprocmask(SIG_SETMASK,{ },0x0) = 0 (0x0)
sigprocmask(SIG_SETMASK,{ SIGHUP|SIGINT|SIGQUIT|SIGILL|SIGTRAP|SIGABRT|SIGEMT|SIGFPE|SIGKILL|SIGBUS|SIGSEGV|SIGSYS|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2 },{ }) = 0 (0x0)
sigaction(SIGILL,{ SIG_DFL SA_ONSTACK ss_t },{ 0x4043967c SA_ONSTACK|SA_SIGINFO ss_t }) = 0 (0x0)
sigprocmask(SIG_SETMASK,{ },0x0) = 0 (0x0)
sigreturn(0xffffffff99f0) EJUSTRETURN
SIGNAL 4 (SIGILL) code=ILL_ILLTRP trapno=0 addr=0xffffffff99f0
frame #0: 0x000008a54e146010
-> 0x8a54e146010: sub sp, x28, #0x8
0x8a54e146014: str x30, [x28, #-0x8]!
0x8a54e146018: sub sp, x28, #0x8
0x8a54e14601c: str x29, [x28, #-0x8]!
(lldb) bt
* thread #1, name = 'WebExtensions', stop reason = signal SIGILL: illegal trap
* frame #0: 0x000008a54e146010
frame #1: 0x000008a54e1167a0
frame #2: 0x000000004a0b6db4 libxul.so`js::jit::MaybeEnterJit(JSContext*, js::RunState&) + 576
@jsm222
jsm222 / mastodon-freebsd.txt
Last active August 14, 2023 14:58
Mastodon on FreeBSD
Not a script but notes, includes simple rc.d scripts which overrides check_process
pkg install -y ImageMagick7-nox11 ffmpeg postgresql15-server libxml2 libxslt git protobuf node16 pkgconf autoconf bison libyaml readline lzlib libffi gdbm nginx redis postgresql15-server \
postgresql15-contrib py39-certbot libidn2 icu ruby30 sudo ruby30-gems rubygem-bundler gmake
corepack enable
yarn set version classic
pw useradd mastodon -d /usr/local/www/mastodon -m -s /nonexistent
from pip._internal.utils.temp_dir import TempDirectory,TempDirectoryTypeRegistry,tempdir_registry,global_tempdir_manager
from pip._internal.commands.install import InstallCommand,reject_location_related_install_options
from pip._internal.cli.cmdoptions import make_target_python
from pip._internal.operations.build.build_tracker import get_build_tracker
from pip._internal.req.req_install import LegacySetupPyOptionsCheckMode, check_legacy_setup_py_options
from pip._internal.cache import WheelCache
from pip._internal.resolution.resolvelib.provider import PipProvider
from pip._internal.resolution.resolvelib.reporter import BaseReporter
from pip._internal.resolution.resolvelib.requirements import SpecifierRequirement
from pip._vendor.resolvelib.resolvers import Resolver
from pip._internal.utils.temp_dir import TempDirectory,TempDirectoryTypeRegistry,tempdir_registry,global_tempdir_manager
from pip._internal.commands.install import InstallCommand,reject_location_related_install_options
from pip._internal.cli.req_command import RequirementCommand, with_cleanup
from pip._internal.cli.cmdoptions import make_target_python
from pip._internal.operations.build.build_tracker import get_build_tracker
from pip._internal.req.req_install import InstallRequirement, LegacySetupPyOptionsCheckMode, check_legacy_setup_py_options
from pip._internal.models.installation_report import InstallationReport
from pip._internal.cache import WheelCache
from pip._internal.resolution.resolvelib.factory import Factory
diff --git a/NuGet.Config b/NuGet.Config
index 4d92b5c1..7302737f 100644
--- a/NuGet.Config
+++ b/NuGet.Config
@@ -2,12 +2,13 @@
<configuration>
<packageSources>
<clear />
- <add key="NuGet" value="https://api.nuget.org/v3/index.json" />
+ <add key="NuGet" value="https://api.nuget.org/v3/index.json" />
diff --git a/sysutils/u-boot-pinebookpro/Makefile b/sysutils/u-boot-pinebookpro/Makefile
--- a/sysutils/u-boot-pinebookpro/Makefile
+++ b/sysutils/u-boot-pinebookpro/Makefile
@@ -1,7 +1,8 @@
MASTERDIR= ${.CURDIR}/../u-boot-master
-
+PORTREVISION= 1
MODEL= pinebookpro
BOARD_CONFIG= pinebook-pro-rk3399_defconfig
FAMILY= rk3399