This file contains 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/perl -w | |
# | |
# Copyright (c) 2000-2014 SUSE Linux AG, Nuernberg, Germany. | |
# All rights reserved. | |
######################################################################## | |
# create a man-page with: | |
# | |
# pod2man --section 1 --center=" " fonts-config | gzip -9 -c > fonts-config.1.gz | |
# cp fonts-config.1.gz /usr/share/man/man1/fonts-config.1.gz |
This file contains 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
fish_path() { | |
setopt localoptions rcquotes nullglob | |
local result part; local -a tree expn; local -i i | |
( | |
tree=(${(s:/:)${1-${PWD/#$HOME/\~}}}) | |
if [[ $tree[1] == \~* ]] { | |
cd -q ${~tree[1]} | |
result=$tree[1]; shift tree | |
} else { cd -q / } | |
for dir in $tree; { |
This file contains 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/env bash | |
# rebuild/reinstall all dkms modules. | |
# double check there's no others missing too afterwards. | |
#template(){ | |
#KVER=x.x.x-arch | |
#ZVER=x.x.x.x-x | |
#dkms status | sed s/,//g | awk '{print "--force -m",$1,"-v",$2}' | while read line; do ls /var/lib/initramfs-tools | xargs -n 1 dkms build --force $line -k; done | |
#dkms status | sed s/,//g | awk '{print "--force -m",$1,"-v",$2}' | while read line; do ls /var/lib/initramfs-tools | xargs -n 1 dkms install --force $line -k; done | |
#dkms build --force -m spl -v $ZVER -k $KVER |
This file contains 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
<# | |
#> | |
function ScriptDiskPart($script) | |
{ | |
$file = [io.path]::GetTempFileName() | |
try | |
{ | |
Set-Content $file $script -Encoding utf8 | |
& diskpart /s $file > $null |
This file contains 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
<# | |
.Synopsis | |
Enumerates the parameters of one or more commands. | |
.Description | |
Lists all the parameters of a command, by ParameterSet, including their aliases, type, etc. | |
By default, formats the output to tables grouped by command and parameter set. | |
.Parameter CommandName | |
The name of the command to get parameters for. | |
.Parameter ParameterName | |
Wilcard-enabled filter for parameter names. |
This file contains 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 | |
# | |
# /sbin/service Handle boot and runlevel services | |
# | |
VERSION="18.02.16" | |
sd_booted() | |
{ | |
test -d /sys/fs/cgroup/systemd/ |
This file contains 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
# autoload | |
alias "$1"="${aliases[$1]:-$1} $argv[2,-1]" | |
# -*- mode: Shell-Script; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*- | |
# vim: ft=zsh sts=2 ts=2 sw=2 et fdm=marker fmr={{{,}}} |
This file contains 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
######################################## | |
# __vte_osc7() vte support | |
######################################## | |
if [[ ${VTE_VERSION:-0} -ge 3405 | |
&& -z ${precmd_functions[(r)__vte_osc7]} | |
&& ( -o interactive || $- == *i* ) | |
&& $TERM == (xterm*|[Vv][Tt][Ee]*) ]] | |
then | |
__vte_urlencode() ( | |
emulate -L zsh |
This file contains 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
#autoload | |
#function realpath { | |
emulate -L zsh -o extendedglob -o function_argzero # -o SOURCE_TRACE -o XTRACE -o VERBOSE | |
typeset f='' o='' | |
(($#)) || { | |
print -u2 "$0: missing operand\nUsage: $0 path [path ...]"; | |
return 1 |
This file contains 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 | |
# fishl.sh - safely change shells to fish while fixing its fishy command_not_found_handler | |
# Alternatively, null cnf handler can be used: | |
# 'function __fish_command_not_found_handler --on-event fish_command_not_found; end' | |
if test -x /usr/bin/fish ; then | |
fishl () ( | |
/usr/bin/env -i \ | |
SHELL=/usr/bin/fish \ | |
TERM="${TERM}" \ |