Standard escape codes are prefixed with Escape
:
- Ctrl-Key:
^[
- Octal:
\033
- Unicode:
\u001b
- Hexadecimal:
\x1B
- Decimal:
27
/* | |
force-inet4-or-inet6.c - hack to force applications to use IPv4 or IPv6 exclusively | |
compilation: cc -fPIC -shared -DUSE_INET4 -o force-inet4.so force-inet4-or-inet6.c | |
cc -fPIC -shared -DUSE_INET6 -o force-inet6.so force-inet4-or-inet6.c | |
usage: LD_PRELOAD=/path/to/library.so program args ... | |
This file is in the public domain. | |
*/ |
To start using the Jellyfin API, authorization is probably the first thing you'll need to do. Jellyfin's authorization options can be a bit confusing because there are a lot of deprecated options.
Generally there are three ways to authenticate: no authorization, user authorization with an access token or authorization with an API key. The first way is easy, just do nothing. But most often you'll need to use either the access token or API key.
There are multiple methods for transmitting authorization values, however, some are outdated and scheduled to be removed.
It's recommend to use the Authorization
header. If header auth isn't an option, the token may be sent through the ApiKey
query parameter. Sending secure data in a query parameter is unsafe as the changes of it leaking (via logs, copy-paste actions or by other means) are high. Only use this method as a last resort.
# original: https://askubuntu.com/questions/25071/how-to-run-a-script-when-a-specific-flash-drive-is-mounted | |
# you can find your device unit with: sudo systemctl list-units -t mount | |
# put this into /etc/systemd/system/your.service | |
[Unit] | |
Description=SharedMountTrigger | |
Requires=mnt-shared.mount | |
After=mnt-shared.mount | |
[Service] |
#!/bin/bash | |
version=1.0.1 | |
versionDate="2014-02-14" | |
function showHelp() { | |
echo "watchfile - monitor file(s)/command and perform action when changed | |
Possible ways of usage | |
---------------------------------------- |
function [maxtab, mintab]=peakdet(v, delta, x) | |
%PEAKDET Detect peaks in a vector | |
% [MAXTAB, MINTAB] = PEAKDET(V, DELTA) finds the local | |
% maxima and minima ("peaks") in the vector V. | |
% MAXTAB and MINTAB consists of two columns. Column 1 | |
% contains indices in V, and column 2 the found values. | |
% | |
% With [MAXTAB, MINTAB] = PEAKDET(V, DELTA, X) the indices | |
% in MAXTAB and MINTAB are replaced with the corresponding | |
% X-values. |
#!/usr/bin/env bash | |
# Allow multiple hooks. | |
# | |
# To use it copy this script with executable permission in ".git/hooks/hook-name" | |
# where hook-name is the name of the hook (see man githooks to know available hooks). | |
# Then place your scripts with executable permission in ".git/hooks/hook-name.d/". | |
hook_type=${BASH_SOURCE##*/} |
require "json" | |
require "pp" | |
state = false | |
references_raw, content = *(`elinks -dump /tmp/dump4`.lines.partition { |line| state = true if line == "References\n" ; state } ) | |
content_began, delayed_link = false, nil | |
references = references_raw.inject({}) do |hsh, line| | |
if line =~ /Visible links$/ | |
content_began = true | |
next hsh |
To install globally, copy prepare-commit-msg
to /usr/local/share/git-core/templates/hooks
and execute:
chmod +x /usr/local/share/git-core/templates/hooks/prepare-commit-msg
To install per-repository, copy prepare-commit-msg
to /path/to/repo/.git/hooks/prepare-commit-msg
and mark it as executable.
#!/bin/bash | |
#updated ffmpeg progress indicator | |
#by Rupert Plumridge | |
#for updates visit www.prupert.co.uk | |
#Creative Commons Attribution-Non-Commercial-Share Alike 2.0 UK: England & Wales Licence | |
# Based on the ffmpegprogress bar from: http://handybashscripts.blogspot.com/2011/01/ffmpeg-with-progress-bar-re-work.html | |
# which was based on my initital progress script - circle of life and all that ;) | |
# version 2.0 | |
# 07.04.2011 | |
# now uses apparently better progress detection, based on duration of overall video and progress along the conversion |