Skip to content

Instantly share code, notes, and snippets.

$ make -f misc/cygwin/Makefile
cc -o clifm.exe src/*.c -O3 -fstack-protector-strong -Wall -Wextra -DCLIFM_DATADIR=/usr/local/share -lreadline -lacl -lmagic -lintl
In file included from src/actions.c:29:
src/helpers.h:127:10: fatal error: glob.h: No such file or directory
127 | #include <glob.h>
| ^~~~~~~~
compilation terminated.
In file included from src/archives.c:26:
src/helpers.h:127:10: fatal error: glob.h: No such file or directory
127 | #include <glob.h>
@LinArcX
LinArcX / init.c
Created November 5, 2023 22:17 — forked from rofl0r/init.c
minimal init daemon by rich felker, author of musl libc
#define _XOPEN_SOURCE 700
#include <signal.h>
#include <unistd.h>
int main()
{
sigset_t set;
int status;
if (getpid() != 1) return 1;
@LinArcX
LinArcX / gist:0eb5487108f7817c247aa21066885d85
Created August 24, 2023 09:44 — forked from junegunn/gist:f4fca918e937e6bf5bad
Browsing git commit history with fzf
# fshow - git commit browser (enter for show, ctrl-d for diff, ` toggles sort)
fshow() {
local out shas sha q k
while out=$(
git log --graph --color=always \
--format="%C(auto)%h%d %s %C(black)%C(bold)%cr" "$@" |
fzf --ansi --multi --no-sort --reverse --query="$q" \
--print-query --expect=ctrl-d --toggle-sort=\`); do
q=$(head -1 <<< "$out")
k=$(head -2 <<< "$out" | tail -1)
00:00:01.414449 VirtualBox VM 6.1.32 r149290 linux.amd64 (Feb 9 2022 00:26:35) release log
00:00:01.414455 Log opened 2022-04-28T07:32:00.284243000Z
00:00:01.414458 Build Type: release
00:00:01.414466 OS Product: Linux
00:00:01.414470 OS Release: 5.15.34_1
00:00:01.414473 OS Version: #1 SMP Thu Apr 14 17:43:53 UTC 2022
00:00:01.414531 DMI Product Name: K53SV
00:00:01.414556 DMI Product Version: 1.0
00:00:01.414580 Firmware type: BIOS
00:00:01.414684 Host RAM: 7867MB (7.6GB) total, 3981MB (3.8GB) available
↳ clinfo
Number of platforms 2
Platform Name Clover
Platform Vendor Mesa
Platform Version OpenCL 1.1 Mesa 21.3.7
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_icd
Platform Extensions function suffix MESA
Platform Name Intel Gen OCL Driver
↳ clinfo
Number of platforms 1
Platform Name Clover
Platform Vendor Mesa
Platform Version OpenCL 1.1 Mesa 21.3.7
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_icd
Platform Extensions function suffix MESA
Platform Name Clover
;; async-run function
(defparameter *async-shell* (uiop:launch-program "bash" :input :stream :output :stream))
(defun async-run (command)
(write-line command (uiop:process-info-input *async-shell*))
(force-output (uiop:process-info-input *async-shell*))
(let* ((output-string (read-line (uiop:process-info-output *async-shell*)))
(stream (uiop:process-info-output *async-shell*)))
(if (listen stream)
(loop while (listen stream)
do (setf output-string (concatenate 'string
(defun linarcx-keyboard-layout (ml)
(declare (ignore ml))
(let ((cmd "xkb-switch -p"))
(string-trim '(#\Newline) (run-shell-command cmd t))))
(add-screen-mode-line-formatter #\L #'linarcx-keyboard-layout)
Also the output of: `(run-shell-command "xkb-switch -p"" t)` is:
"us
"
↳ sbcl --load quicklisp.lisp
This is SBCL 2.2.0.void.2, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.
SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
==== quicklisp quickstart 2015-01-28 loaded ====
#include "stdafx.h"
#include <iostream>
#include <string>
#include <vector>
#include <list>
#include <memory>
#include "../pugixml-1.11/src/pugixml.hpp"
class Component {
std::shared_ptr<Component> parent_;