Skip to content

Instantly share code, notes, and snippets.

View dissoc's full-sized avatar

Justin dissoc

  • texas
View GitHub Profile
@dissoc
dissoc / allow-unsafe-eval.patch
Created February 22, 2024 08:38 — forked from blake-ctrl/allow-unsafe-eval.patch
Chromium Patch to allow Javascript 'unsafe-eval' in manifest v3 extensions. DEVELOPMENT TOOL TO ENABLE CLJS HOT-RELOADING
From 36a4180bd37e851686b95ac4aac5bfe22036ce49 Mon Sep 17 00:00:00 2001
From: root <root@chromium.lxd>
Date: Tue, 19 Sep 2023 02:53:45 +0000
Subject: [PATCH] Hacks to allow unsafe-eval in mv3 chrome extensions
---
chrome/browser/ash/system_web_apps/apps/terminal_source.cc | 2 +-
extensions/common/csp_validator.cc | 2 +-
extensions/common/manifest_handlers/csp_info.cc | 6 +++---
3 files changed, 5 insertions(+), 5 deletions(-)
@dissoc
dissoc / sysv.init.script.to.systemd.unit.file.md
Created December 30, 2019 21:30 — forked from houtianze/sysv.init.script.to.systemd.unit.file.md
Convert SysV Init scripts to Systemd Unit File

Let's say you have a SysV Init Script named foo

  1. Copy the file to /etc/init.d/foo

  2. Enable the SysV service: chkconfig --add foo

  3. Enable the SysV service: chkconfig foo on

  4. Start the service: service foo start. After this, systemd-sysv-generator will generate this file /run/systemd/generator.late/foo.service, copy this file to /etc/systemd/system by running: cp /run/systemd/generator.late/foo.service /etc/systemd/system/foo.service

  5. Edit /etc/systemd/system/foo.service by running systemctl edit foo.service, add in the following line to foo.servie (this makes the service installable)

[Install]