Skip to content

Instantly share code, notes, and snippets.

modes.add_cmds({{ ":ddg", "Search with DuckDuckGo",
function (w, o) w.view:eval_js("(function(){ var form = document.createElement('form'); form.method='POST'; form.action='https://duckduckgo.com'; var input=document.createElement('input'); input.name='q'; input.value='".. o.arg .. "'; form.appendChild(input); form.submit(); })();", {
no_return = true,
callback = function (_, err)
w:error(err)
end,
}) end }})
@Chocimier
Chocimier / crossbuild-support.patch
Last active July 16, 2018 11:12
crossbuild-support.patch
diff --git KF5AuthConfig.cmake.in KF5AuthConfig.cmake.in
index 0895e60..59fe53b 100644
--- KF5AuthConfig.cmake.in
+++ KF5AuthConfig.cmake.in
@@ -17,8 +17,8 @@ include("${CMAKE_CURRENT_LIST_DIR}/KF5AuthMacros.cmake")
if(NOT "${KAUTH_BACKEND_NAME}" STREQUAL "FAKE")
if(CMAKE_CROSSCOMPILING AND KF5_HOST_TOOLING)
- find_file(TARGETSFILE KF5Auth/KF5AuthToolsTargets.cmake PATHS ${KF5_HOST_TOOLING} ${CMAKE_CURRENT_LIST_DIR} NO_DEFAULT_PATH)
- include("${TARGETSFILE}")
@Chocimier
Chocimier / commit-msg
Created January 16, 2019 11:47
void-packages commit-msg
#!/bin/sh
# commit-msg hook
if grep -q 'update to' "$1"; then
if git diff --staged | grep -qP '^( |\+)revision=1$'; then
:
else
echo 'On update, revision need to be 1. ~hook'
exit 1
@Chocimier
Chocimier / patches
Last active July 20, 2019 19:05
patches
.
@Chocimier
Chocimier / deps.sh
Last active July 30, 2022 03:46
cycles in xbps-packages templates
# usage:
# cd $XBPS_DISTDIR
# ./deps.sh
# ./loops.py builddeps $XBPS_DISTDIR/srcpkgs
mkdir -p builddeps
find srcpkgs -mindepth 1 -maxdepth 1 | cut -d/ -f2 | while read pkg; do echo ' '$pkg; ./xbps-src show-build-deps $pkg > builddeps/$pkg; done

Introduction

SAT solver can be used to implement xbps-repodb --index, that move packages from stagedata to repodata, ensuring consistency of package requirements.

Variables

Real packages, virtual packages and shared libraries are represented as boolean variables. Value of true represents presence of item in repo, false represent absence.