Skip to content

Instantly share code, notes, and snippets.

View Yetangitu's full-sized avatar

Frank de Lange Yetangitu

View GitHub Profile
:root{--border-radius-rounded: calc(var(--default-clickable-area) / 2 + var(--default-grid-baseline) * 2 - 2px);--body-container-radius: var(--border-radius-rounded);--body-container-margin: calc(var(--default-grid-baseline) * 2);--body-height: calc(100% - env(safe-area-inset-bottom) - 50px - var(--body-container-margin))}@media screen and (max-width: 1024px){:root{--body-container-margin: 0px;--body-container-radius: 0px}}html{width:100%;height:100%;position:absolute;background-color:var(--color-background-plain, var(--color-main-background))}body{background-color:var(--color-background-plain, var(--color-main-background));background-image:var(--image-background, var(--image-background-default));background-size:cover;background-position:center;position:fixed;width:100%;height:calc(100vh - env(safe-area-inset-bottom))}h2{font-weight:bold;font-size:20px;margin-bottom:12px;line-height:30px;color:var(--color-text-light)}h3{font-size:16px;margin:12px 0;color:var(--color-text-light)}h4{font-size:14px}em{font-style
@Yetangitu
Yetangitu / run_index_job
Created April 13, 2018 21:12
script to run recollindex with correct parameters
#!/bin/sh
export XAPIAN_FLUSH_THRESHOLD=100
export RECOLL_CONFDIR=/path/to/directory/which/contains/recoll/config/file
export RECOLL_TMPDIR=$(mktemp -d /tmp/recollindex.XXXXXXXX)
recollindex > $RECOLL_CONFDIR/index.log 2>&1
rm -rf /tmp/$(basename $RECOLL_TMPDIR)
@Yetangitu
Yetangitu / recoll.conf
Created April 13, 2018 21:07
Recoll config file to index /var/src
topdirs = /var/src
idxrundir = tmp
textfilemaxmbs = 900
idxflushmb = 100
@Yetangitu
Yetangitu / random_name_generator.bash.cgi
Created March 1, 2018 14:11
Random domain name generator
#!/bin/bash
declare -a ADJECTIVE
declare -a CRITTER
ADJECTIVE=(white red blue pink green brown dark light big small tiny earth glass air)
# or, for more variation, feed it a list of adjectives from a file, one word per line.
# the same could be done for the CRITTER array
#ADJECTIVE=($(cat /home/frank/adjectives))
CRITTER=(frog hound fish lizard gator moose monkey whale hippo fox bird weasel owl cow pig hog donkey duck executive manager lawyer accountant)
@Yetangitu
Yetangitu / Hooks.php
Created March 14, 2017 22:26
Possible implementation of \OC\Files preDelete and \OC\User preDelete hook listeners in Owncloud and Nextcloud
<?php
/**
* @author Frank de Lange
* @copyright 2017 Frank de Lange
*
* This file is licensed under the Affero General Public License version 3 or
* later.
* See the COPYING-README file.
*/
@Yetangitu
Yetangitu / oc-watch.sh
Last active February 24, 2016 19:17
inotifywait-based change generator for use with apps/files scan api
#!/bin/bash
# inotify-based file watcher, to be used in combination with a patched files app
# command which supports the scanSingle/scanBatch api
#
# run as any user; make sure user can modify the PID file
TIMEOUT=60
OC_ROOT=/var/www/owncloud