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 --git a/src/preferences.c b/src/preferences.c | |
| index 79bf452..0954024 100644 | |
| --- a/src/preferences.c | |
| +++ b/src/preferences.c | |
| @@ -25,6 +25,10 @@ | |
| #include "preferences.h" | |
| #include "parcellite-i18n.h" | |
| #define MAX_HISTORY 1000 | |
| + | |
| +/* gtk2.10 (on RHEL5.x) doesn't have this function */ |
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/env python | |
| # | |
| # Read a CSV file from STDIN, assume the 1st column is unix-seconds | |
| # convert it to excel time value ( (UNIXSEC + 32400) / 86400 + 25569 ) | |
| # and insert it as 2nd column | |
| # | |
| import sys | |
| for line in sys.stdin.readlines(): | |
| (unixsec_str, delim, rest) = line.partition(',') |
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/env python | |
| import datetime | |
| import sys | |
| def time_map_by_dow(dt, begindate): | |
| """ | |
| Convert a datetime object dt to | |
| the same time, same day-of-week of duration | |
| within begindate and begindate + 6 (inclusive) |
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 | |
| # a lazy guy's wrapper for apt commands | |
| case $1 in | |
| showpkg|showsrc|stats|search|show|depends|rdepends|pkgnames) | |
| set -x | |
| apt-cache "$@" | |
| ;; | |
| # short-cuts |
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 | |
| # | |
| # Give sudo right to run chrt for giving RT prio for synergys | |
| # (relatively) safely to avoid delay of cursor or | |
| # keyboard input in remote end. | |
| # | |
| # So far scheduler (SCHED_RR) and prio (50) is hard-coded. | |
| synergys_exepath="/usr/bin/synergys" |
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/python | |
| import sys | |
| import os | |
| if len(sys.argv) <= 1: | |
| print os.path.realpath(os.getcwd()) | |
| else: | |
| print os.path.realpath(sys.argv[1]) |
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 -ue | |
| bash_trace () { | |
| typeset -i i=0 | |
| for func in "${FUNCNAME[@]}" | |
| do | |
| printf '%15s() %s:%d\n' \ | |
| "$func" "${BASH_SOURCE[$i]}" "${BASH_LINENO[$i]}" |
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/python | |
| import sys | |
| import urllib | |
| print urllib.unquote_plus(sys.argv[1]) |
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 | |
| # watch screensaver's lock/unlock activity and log | |
| log=$HOME/usr/var/log/screensaver.log | |
| DIE () { | |
| touch $log | |
| echo "ERROR: $*" | tee -a $log >&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/sh | |
| # | |
| # TODO: | |
| # - Parhaps TARGET_DIR should be a last argument (like mv) | |
| # - Option like grep's -r switch might be useful(?) | |
| # - Verbose option to report witch files are moved and which are skipped | |
| DIE () { | |
| echo "ERROR: $@" | |
| exit 1 |