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
# This is the ssh client system-wide configuration file. See | |
# ssh_config(5) for more information. This file provides defaults for | |
# users, and the values can be changed in per-user configuration files | |
# or on the command line. | |
# Configuration data is parsed as follows: | |
# 1. command line options | |
# 2. user-specific file | |
# 3. system-wide file | |
# Any configuration value is only changed the first time it is set. |
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
Migrated to https://github.com/davidfoerster/apt-remove-duplicate-source-entries |
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
import abc | |
import collections.abc | |
class KeyTransformDictionaryBase(dict, abc.ABC): | |
__slots__ = () | |
@abc.abstractmethod | |
def __key_transform__(self, key): |
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/python3 -OO | |
import sys | |
import operator | |
import scholarly | |
import urllib.parse | |
DEFAULT_ATTRIBUTES = ( | |
'citedby', 'citedby5y', | |
'hindex', 'hindex5y', | |
'i10index', 'i10index5y' |
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/python3 | |
import sys | |
import locale | |
import functools | |
from datetime import datetime | |
timefmt = '%b %d %H:%M:%S' | |
def parse_arg_time(s): |
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
#include <stdlib.h> | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <string.h> | |
#include <errno.h> | |
int main(int argc, char *argv[]) | |
{ | |
if (argc <= 0) |
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/python3 | |
import sys | |
with open(sys.argv[1]) as dict_file: | |
dictionary = dict(line.rstrip('\n').split(None, 1) for line in dict_file) | |
with sys.stdin: | |
for line in sys.stdin: | |
line = line.rstrip('\n') | |
print(dictionary.get(line, line)) |
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 | |
set -eu -o noclobber | |
outfile_format='Screenshot %(%F %T)T' | |
imgext=png | |
screenshot='gnome-screenshot -f' | |
postprocessor=gimp | |
# Discover user picture directory | |
user_dirs="${XDG_CONFIG_HOME:-"$HOME/.config"}/user-dirs.dirs" | |
[ ! -e "$user_dirs" ] || source "$user_dirs" |
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/sh | |
INPUT=doc.pdf | |
OUTPUT=doc.ps | |
PASSWORD=foobar | |
gs -sDEVICE=pswrite -dSAFER -dBATCH -dNOPAUSE \ | |
-dColorConversionStrategy=/LeaveColorUnchanged -dDownsampleMonoImages=false -dDownsampleGrayImages=false \ | |
-dDownsampleColorImages=false -dAutoFilterColorImages=false -dAutoFilterGrayImages=false \ | |
-dColorImageFilter=/FlateEncode -dGrayImageFilter=/FlateEncode -dPassThroughJPEGImages=true \ | |
-sPDFPassword="$PASSWORD" -sOutputFile="$OUTPUT" "$INPUT" |
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 | |
set -eu | |
declare -r TMP="${1:-"${TMP:-/tmp}/find-test"}" | |
declare -ri file_count="${2:-1000000}" pad="${3:-255}" | |
declare -ar find=( find "$TMP" -mount -mindepth 1 ) | |
# Preparation | |
mkdir -p -- "$TMP" | |
declare -i free_inodes="$(stat -f -c %d -- "$TMP")" | |
if [ "$free_inodes" -gt 0 ]; then |
NewerOlder