systemctl daemon-reload && { systemctl restart local-fs.target; systemctl restart remote-fs.target; }
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$dirSep = DIRECTORY_SEPARATOR; | |
$boltRoot = realpath(__DIR__ . DIRECTORY_SEPARATOR . '..'); | |
$autoloaderPaths = array( | |
'Standard' => $boltRoot . $dirSep . 'vendor' . $dirSep . 'autoload.php', | |
'Composer' => $boltRoot . $dirSep . '..' . $dirSep . '..' . $dirSep . 'autoload.php'; | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/expect -f | |
### BEGIN CONFIGURATION ####################################################### | |
set VERBOSITY 1 | |
set PASSWORD_LENGTH 40 | |
### END CONFIGURATION ######################################################### | |
exp_internal 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unalias lsusb &>/dev/null; lsusb() { | |
/usr/bin/lsusb "$@" | awk 'BEGIN { idexpr="[[:xdigit:]]{4}"; vexpr="^"idexpr"[[:space:]]+"; pexpr="^\t"idexpr"[[:space:]]+" | |
while (("curl -sS http://www.linux-usb.org/usb.ids") | getline) { | |
if($0 == "# List of known device classes, subclasses and protocols") {break} | |
else if(lastv == "" && substr($1, 0, 1) == "#") {continue} | |
else if(lastv != "" && $0 ~ pexpr) {lastp=$1; sub(pexpr, ""); r[lastv, lastp]=$0} | |
else if($0 ~ vexpr) {lastv=$1; sub(vexpr, ""); r[lastv]=$0} | |
} | |
} | |
"ID "idexpr":"idexpr"$" {split($6, id, ":"); printf "%s %s %s\n", $0, r[id[1]], (r[id[1], id[2]])}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# bash-app-template-v1.sh | |
# description: Gist-based Bash script app template | |
# author: Adrian Günter <adrian|gntr/me> | |
# grepping: | |
# - sections: ^### (?<section>.+) ### | |
# - actions: ^# ACTION: (?<action>.+) | |
# - a function's definition: func_name\(\) | |
# sections: SHELLCFG,DEPENDENCIES,CONSTANTS,FUNCTIONS,ACTIONS,ROUTINE | |
# actions: self-install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/sh | |
# qubes-sysmon.sh – Qubes OS System Monitor for Lenovo ThinkPads | |
# Copyright (c) 2017 Adrian Günter | |
# | |
# @Authors Adrian Günter <adrian|gntr/me> | |
# @URL https://gist.github.com/adrianguenter/f55958ad27de2c341a4dbc490978dd40 | |
# @License http://opensource.org/licenses/MIT | |
# @Shells Bash >=4.4, Dash >=0.5 | |
# @Usage [WATCHARGS=d] qubes-sysmon.sh <timeout-secs> | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/sh | |
# mount-image.sh – Mount the partitions of a block device image ($1) to a temporary location | |
# Copyright (c) 2017 Adrian Günter | |
# | |
# @Authors Adrian Günter <adrian|gntr/me> | |
# @URL https://gist.github.com/adrianguenter/5072827b71e27661263a5cfba651b859 | |
# @License http://opensource.org/licenses/MIT | |
# @Shells Bash >=4.4, Dash >=0.5 | |
# @Usage mount-image.sh <image-path> | |
# @Example |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Diff a file on the filesystem with the current package version | |
set -eu | |
file="${1:?No file specified}" | |
[ -e "$1" ] || { >&2 printf 'Path does not exist: %s\n' "$1"; exit 1; } | |
[ ! -d "$1" ] || { >&2 printf 'Path is a directory: %s\n' "$1"; exit 2; } | |
# Canonicalize $file without resolving the basename | |
dir="$(readlink -f "$(dirname "$file")")" | |
file="$(basename "$file")" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -ruN '--exclude=PATCHES.txt' json-schema/Generator/NormalizerGenerator.php json-schema.symfony-63-getSupportedTypes/Generator/NormalizerGenerator.php | |
--- json-schema/Generator/NormalizerGenerator.php 2023-06-24 16:46:45.876081361 -0400 | |
+++ json-schema.symfony-63-getSupportedTypes/Generator/NormalizerGenerator.php 2023-06-24 16:46:39.636091630 -0400 | |
@@ -9,6 +9,9 @@ | |
use Jane\Component\JsonSchema\Registry\Schema; | |
use PhpParser\Node\Expr; | |
use PhpParser\Node\Name; | |
+use PhpParser\Node\NullableType; | |
+use PhpParser\Node\Param; | |
+use PhpParser\Node\Scalar; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/php -dxdebug.mode=off | |
<?php | |
declare(strict_types=1); | |
use App\Kernel; | |
switch (\ini_get('xdebug.mode')) { | |
case false: | |
case 'off': | |
/** NOP */ |