Skip to content

Instantly share code, notes, and snippets.

View lebensterben's full-sized avatar
🤌
Never half-ass two things, whole-ass one thing.

Lucius Hu lebensterben

🤌
Never half-ass two things, whole-ass one thing.
View GitHub Profile
@lebensterben
lebensterben / R headers.md
Last active September 22, 2020 23:55
Dependencies in R's C Interface
path dependencies descriptions
R.h 12 includes many other files
S.h 5 different version for code ported from S
Rinternals.h 11 definitions for using R’s internal structures
Rdefines.h 13 macros for an S-like interface to the above (no longer maintained)
Rmath.h 1 standalone math library
Rversion.h 0 R version information
Rinterfaces.h 13 for add-on front-ends (Unix-alikes only)
#!/usr/bin/env bash
## References:
## https://community.clearlinux.org/t/how-to-h264-etc-support-for-firefox-including-ffmpeg-install
## Install dependencies
echo -e "\e[33m\xe2\x8f\xb3 Install the following dependencies: 'c-basic', 'devpkg-libva', and 'git' ...\e[m"
sudo swupd bundle-add c-basic devpkg-libva git
## Clone the ffmpeg git repository if it doesn't exist; or update it if it exists
# Set prompt and title (for interactive shells only)
if [ "$(expr $- : '.*i')" -ne 0 ]; then
# this works for sh and bash
if [ -z "$ZSH_VERSION" ]; then
# first get exit code of last command, and set colors
PS1="\$(\
EXIT=\"\$?\" ; \
BLUE=\"\[\e[38;5;39m\]\" ; \
RED=\"\[\e[31m\]\" ; \
DKMS make.log for nvidia-430.26 for kernel 5.1.15-789.native (x86_64)
Wed Jul 3 01:55:31 EDT 2019
make[1]: Entering directory '/usr/lib/modules/5.1.15-789.native/build'
SYMLINK /var/lib/dkms/nvidia/430.26/build/nvidia/nv-kernel.o
SYMLINK /var/lib/dkms/nvidia/430.26/build/nvidia-modeset/nv-modeset-kernel.o
CONFTEST: INIT_WORK
CONFTEST: hash__remap_4k_pfn
CONFTEST: set_pages_uc
CONFTEST: list_is_first
CONFTEST: set_memory_uc
DKMS make.log for nvidia-430.26 for kernel 5.1.15-789.native (x86_64)
Wed Jun 26 15:34:56 EDT 2019
make[1]: Entering directory '/usr/lib/modules/5.1.15-789.native/build'
SYMLINK /var/lib/dkms/nvidia/430.26/build/nvidia/nv-kernel.o
SYMLINK /var/lib/dkms/nvidia/430.26/build/nvidia-modeset/nv-modeset-kernel.o
CONFTEST: INIT_WORK
CONFTEST: hash__remap_4k_pfn
CONFTEST: set_pages_uc
CONFTEST: list_is_first
CONFTEST: set_memory_uc
#compdef swupd
# -----------------------------------------------------------------------
# Software Updater - autocompletion script
#
# Author: Lucius Hu - http://github.com/lebensterben
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 2 or later of the License.
#
#-*- mode: shell-script -*-
# list files included in a list of bundle
swupd-list () {
local myname usage opts file i
local -a output
local OPTARG OPTIND
read -r -d '' usage <<EOT
Usage:
swupd-list [-o OUTPUTFILE] BUNDLE [BUNDLE2 ...]
#-*- mode: shell-script -*-
# list files included in a list of bundle
#swupd-list () {
emulate -RL zsh
setopt extendedglob
local myname usage opts file i
local -a output
local OPTARG OPTIND
[Desktop Entry]
Type=Application
Version=1.0
Name=Jar Opener
# This is for opening files, not launching the notebook from a menu
NoDisplay=true
Exec=java -jar %f
Terminal=true
MimeType=application/x-java-archive;
#-*- mode: shell-script -*-
# search zsh keybinding with specific keyword
#fdkey () {
bindkey | awk -v pattern="$@" '$2 ~ pattern {printf("%5d: %-32s %s\n", NR, "\033[0;33m"$1"\033[0m", $2)}'
#}