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
#/* \ | |
make -C "$(dirname "$0")" -f "$0" "$@"; exit $? | |
libcmdsdaskpass.so: LDFLAGS += -shared | |
libcmdsdaskpass.so: LDLIBS += -ldl | |
libcmdsdaskpass.so: cmdsdaskpass.o | |
$(CC) $(LDFLAGS) $(TARGET_ARCH) $^ $(LOADLIBES) $(LDLIBS) -o $@ | |
cmdsdaskpass.o: CFLAGS += -fPIC | |
cmdsdaskpass.o: cmdsdaskpass.c | |
$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c -o $@ $^ | |
help: |
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
#/* \ | |
make -C "$(dirname "$0")" -f "$0" "$@"; exit $? | |
crc32: LDLIBS += -lz | |
crc32: crc32.o | |
$(CC) $(LDFLAGS) $(TARGET_ARCH) $^ $(LOADLIBES) $(LDLIBS) -o $@ | |
crc32.o: crc32.c | |
$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c -o $@ $^ | |
help: | |
$(info ) | |
$(info http://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-generate-a-crc32-checksum-163908/#post4670222) |
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 | |
set -e | |
eval "$(git rev-parse --parseopt -- "$@" <<EOF || echo exit $? | |
${0##*/} [OPTIONS...] {SERVICE} [TIMEOUT] | |
Wait for {SERVICE} to be registered on the bus. | |
-- | |
y,system Connect to system bus | |
e,session Connect to user bus |
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/perl | |
use 5.014; | |
our $VERSION = 0.001; | |
use strict; | |
use warnings; | |
use autodie; | |
use Carp qw(carp croak); | |
use File::Basename qw(dirname); |
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/perl | |
use strict; | |
use Digest::MD5 qw(md5); | |
use Fcntl qw(:DEFAULT :seek); | |
use Getopt::Long qw(:config gnu_getopt); | |
my $bs = 4096; | |
my $skip = 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
#!/bin/bash | |
set -e | |
IFS=$'\t' | |
list_devices() { | |
local line default_sink_name default_source_name | |
local sink source name driver format state | |
while read -r line; do | |
case ${line} in |
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/perl | |
use Compress::Zlib; | |
undef $/; | |
binmode(ARGV); | |
while (<>) { | |
my ($a, $b, $c) = unpack 'a3a5a*' => $_; | |
if ($a eq 'CWS') { | |
open FH, '>:raw', "${ARGV}.raw"; | |
syswrite FH, "FWS$b"; | |
syswrite FH, uncompress($c); |
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 -e | |
WHEN=${1} | |
shift | |
if [[ -z ${WHEN} ]]; then | |
echo "Usage: ${0} <date/time format> [program]" | |
exit 1 | |
fi | |
TARGET=$(date -d "${WHEN}" +%s) | |
echo "Terminating on $(date -d "@${TARGET}")" | |
while :; do |
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 | |
exec /usr/bin/busctl --user call org.kde.klauncher5 /KLauncher org.kde.KLauncher exec_blind sas -- "$1" $(($#-1)) "${@:2}" | |
exit $? |
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 -e | |
USAGE='git sgrep [<options>] [-e] <pattern> [<rev>...] [[--] <path>...]' | |
NONGIT_OK=1 | |
SUBDIRECTORY_OK=1 | |
. "$(git --exec-path)/git-sh-setup" | |
declare -a opts=() patterns=() revpaths=() | |
git config --get-colorbool diff && opts+=(--color=always) || opts+=(--color=never) | |
while (($#)); do | |
arg=$1; shift |
OlderNewer