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 | |
IPS="216.218.221.6:216.218.221.42:74.82.46.6:216.66.84.46:216.66.86.114:216.66.87.14:216.66.80.30:216.66.88.98:216.66.84.42:216.66.86.122:216.66.80.90:216.66.80.162:216.66.80.98:216.66.22.2:184.105.253.14:184.105.253.10:184.105.250.46:72.52.104.74:64.62.134.130:216.66.77.230:209.51.161.58:209.51.161.14:66.220.7.82:216.218.226.238:216.66.38.58:184.105.255.26" | |
#IPS="216.218.221.6" | |
IT="${IPS}:" | |
while [ -n "$IT" ] | |
do | |
VAL="${IT%%:*}" | |
RES=$(ping -q -n -c 9 "${VAL}" | grep -e 'rtt' | cut -d ' ' -f 4) |
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
" Fix cursor movement and backspace in insert mode for vim.tiny. | |
set nocompatible | |
set backspace=indent,eol,start |
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
# Here prefx "S" means start, and "K" means stop/kill. | |
# Two digits after mean order of start and kill operations. | |
# I have not found any standard defining this order, | |
# but orders above 90 usually are user scripts. | |
# List installed runlevels | |
ls /etc/rc.d/rc?.d/*someservice | |
# Remove from any runlevels | |
rm /etc/rc.d/rc?.d/*someservice |
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 | |
# This is /etc/sysconfig/someservice: | |
# CHARTSRVBASE="/opt/someservice" | |
# CHARTSRVRUN="/opt/someservice" | |
# CHARTSRVBIN="/opt/someservice/someservice" | |
# CHARTSRVPID="/var/run/someservice.pid" | |
# CHARTSRVLOG="/var/log/someservice/someservice-$(date +%Y%m%d%H%M%S).log" | |
######################################################################## | |
# Begin $rc_base/init.d/ | |
# Description : |
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 | |
# This script allows to resample images from whatever DPI to 75 DPI (screen resolution) | |
# in batch. I use it to prepare smallsize images of scans of my IDs, etc... | |
cd path/to/collections/base/dir | |
for fi in $(/bin/ls -1 image_collection_600dpi/*) | |
do | |
fo="$(echo $fi | sed 's/_[[:digit:]]\+dpi//g')" | |
echo convert-im6 $fi -units PixelsPerInch -resample 75 $fo |
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 | |
# Sync local date to remote host over ssh | |
ssh remote.host.net sudo date $(date "+%m%d%H%M%Y.%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
#!/bi/sh | |
# Fix dhcp name change. Works for Debian on 2015-07-11. | |
sudo echo "supersede host-name gethostname();" >> /etc/dhcp/dhclient.conf |
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/false | |
## First: select file set. | |
/bin/ls -1 prefix_to_remove_* | |
## Second: test transformation. | |
/bin/ls -1 prefix_to_remove_* | sed 's/^prefix_to_remove_\(.*\)$/\1/' | |
## Third: execute | |
## NOTE: Added 'mv \0 ' to the sed command and '| sh' to the pipe. |
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
\documentclass{article} | |
\usepackage{xltxtra} | |
\usepackage{xecyr} | |
\usepackage{polyglossia} | |
\setmainlanguage{russian} | |
\setotherlanguage{english} | |
\newfontfamily\cyrillicfont{DejaVu Serif} |
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 | |
OUT="result" convert source1.tiff source1.tiff ... -depth 75 -units pixelsperinch -compress zip $OUT.pdf && pdf2ps $OUT.pdf && ps2pdf $OUT.ps && rm -f $OUT.ps |
OlderNewer