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 | |
# Posix shell script to convert between time in human form and date | |
# Copyright (C) 2011 Matous J. Fialka, <http://mjf.cz/> | |
# Released under the terms of The MIT License | |
if humantime=`humantime -f $@` | |
then | |
date -d "$humantime seconds" '+%F %T' | |
fi |
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 | |
# Posix shell script to connect two shell commands by bi-directional pipe | |
# Copyright (C) 2011 Matous J. Fialka, <http://mjf.cz/> | |
# Released under the terms of The MIT License | |
if [ $# -ne 2 ] | |
then | |
printf -- 'Usage: bip COMMAND COMMAND\n' | |
exit 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/sed -f | |
# Transform ASCII-art tables into XTerm-art tables | |
# Copyright (C) 2011 Matous J. Fialka, <http://mjf.cz/> | |
# Released under the terms of The MIT License | |
# Horizontal and vertical line crossing | |
s/-|-/-^[(0^On^[(B-/g | |
# Top side and vertical line crossing |
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
/** | |
* Strip Juniper Comments | |
* Copyright (C) 2011 Matous J. Fialka, <http://mjf.cz/> | |
* Released under the terms of The MIT License | |
*/ | |
#include <stdio.h> | |
enum { | |
ASCII_NUL = '\000', |
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
/** | |
* Year - normal, leap or calendar change 1752 year? | |
* Copyright (C) 2011 Matous J. Fialka, <http://mjf.cz/> | |
* Released under the terms of The MIT License | |
* | |
* Install as follows: | |
* | |
* $ cc -pedantic -ansi -pedantic-errors -Wall -Werror year.c -o year | |
* $ su -c 'cp year /usr/local/bin' | |
*/ |
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
/** | |
* Easter - calculate Easter Sunday (Gregorian calender) | |
* Copyright (C) 2011 Matous J. Fialka, <http://mjf.cz/> | |
* Released under the terms of The MIT License | |
* | |
* $ cc -pedantic -ansi -pedantic-errors -Wall -Werror easter.c -o easter | |
* $ su -c 'cp easter /usr/local/bin' | |
*/ | |
#include <stdlib.h> |
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
-------------------------------------------------------------------------------- | |
-- look.lua - Ion3 or Ion3plus look called "Shiny" | |
-- Copyright (C) 2008,2009 Matous J. Fialka, <http://mjf.cz/> | |
-- Relesed under the terms of The MIT License | |
-- | |
-- Remarks: Drop into ~/.ion3/ or install in the system-wide directory | |
-- Authors: Matous Jan Fialka | |
-- Created: Tue Apr 1 00:12:52 CEST 2008 | |
-- Updated: Mon Feb 9 01:09:41 CET 2009 | |
-- |
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
/** | |
* Possibly the shortest program to expand tabelators to spaces | |
* Copyright (C) 2011 Matous J. Fialka, <http://mjf.cz/> | |
* Released under the terms of The MIT License. | |
*/ | |
#include <stdio.h> | |
int | |
main(void) |
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 | |
# Record - record shell session using script(1) | |
# Copyright (C) 2011 Matous J. Fialka, <http://mjf.cz/> | |
# Released under the terms of The MIT License | |
RECORD_PATH="$HOME/.typescripts/%Y/%m/%d" | |
RECORD_FILE='%H%M%S' | |
RECORD_TIMING_FILE="$RECORD_FILE.timing" |
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 | |
# Pulsing date XTerm mastery | |
# Copyright (C) 2011 Matous J. Fialka, <http://mjf.cz/> | |
# Released under the terms of The MIT License | |
# Prerequisities: flock tput TERM=xterm-256color | |
lock() | |
{ |
OlderNewer