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
diff --git xattr.c xattr.c | |
index 41d2fbd..1f297e9 100644 | |
--- xattr.c | |
+++ xattr.c | |
@@ -60,10 +60,10 @@ int main(int argc, char** argv) { | |
free(value); | |
} | |
putchar('\n'); | |
+ putchar('\n'); | |
} |
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
/* rsacrypt, v.1.1 | |
* Written 3 Jan 2008 by John T. Wodder II | |
* Last edited 21 Jan 2008 by John Wodder | |
* | |
* This program uses the OpenSSL libcrypto cryptographic library to perform RSA | |
* encryption & decryption on files of arbitrary length. It was written mainly | |
* because I couldn't find a program that already did this. | |
*/ | |
/* Things that need to be addressed: |
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
module Ternary where | |
data TernaryBranch a = a :? a deriving (Eq, Ord, Read, Show, Bounded) | |
instance Functor TernaryBranch where fmap f (x :? y) = f x :? f y | |
infixr 0 ?:, :?, ?~ | |
(?:) :: Bool -> TernaryBranch a -> a | |
True ?: (y :? _) = y | |
False ?: (_ :? z) = z |
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 | |
n=1000 | |
args=`getopt n:o: $*` || { | |
echo "Usage: bench [-n runs] [-o outfile] cmd args ..." | |
exit 2 | |
} | |
set -- $args | |
for i | |
do case "$1" in | |
-n) n="$2"; shift; shift;; |
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 procedure takes a Font resource and creates a new font from it that uses | |
% the ISOLatin1Encoding encoding vector. It is based on code given in the PLRM. | |
% Stack effect: font name-of-new-font -- new-font | |
% Example usage: | |
% /Helvetica findfont /Helvetica-Latin1 mkLatin1 12 scalefont setfont | |
/mkLatin1 { | |
exch dup length dict begin |
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 <stdio.h> | |
#include <stdint.h> | |
#include <limits.h> | |
#include <float.h> | |
void showInt(const char* name, size_t bytes, intmax_t max, intmax_t min, | |
uintmax_t umax); | |
/* Converting between floating-point types undoubtedly won't preserve things | |
* appropriately, so showFloat is implemented as a macro: */ |
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/perl -wnl | |
# A Perl script for printing all unique NetHack deaths incurred and their | |
# frequencies, based on a shell script posted to RGRN by "Faux_Pseudo" | |
# Written 12 Nov 2008 by John T. Wodder II | |
# Last edited 14 Nov 2008 by John Wodder | |
# Usage: deaths.pl [-sw] [logfile ...] | |
# Options: | |
# -s - If no logfiles are given on the command line, read from stdin instead | |
# of /usr/games/lib/nethackdir/logfile | |
# -w - Strip off any "while helpless" messages & similar stuff that comes |
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 <curses.h> | |
int main(void) { | |
initscr(); | |
noecho(); | |
cbreak(); | |
start_color(); | |
init_pair(1, COLOR_RED, COLOR_BLACK); | |
init_pair(2, COLOR_GREEN, COLOR_BLACK); | |
init_pair(3, COLOR_BLUE, COLOR_BLACK); | |
init_pair(4, COLOR_CYAN, COLOR_BLACK); |
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/perl -wl | |
# finbin - find binaries in the user's PATH | |
# See the POD at the end of the file for documentation. | |
use strict; | |
use File::Glob 'bsd_glob', 'GLOB_NOCASE', 'GLOB_QUOTE', 'GLOB_BRACE'; | |
use Getopt::Std; | |
my %opts; | |
our $VERSION = 1.3; | |
getopts('fFp:qx', \%opts) || exit 2; |
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 | |
""" | |
This script lists all APT package updates currently available for your system | |
along with the version numbers of the old & new packages. It is derived from | |
``/usr/lib/update-notifier/apt-check`` in the ``update-notifier-common`` | |
package on Ubuntu 14.04 (Trusty Tahr) and is made available under the same | |
license (the GNU GPL v2). | |
This script is know to work on Ubuntu Trusty and Xenial, and it should work on | |
any recent version of Ubuntu with the ``python3-apt`` package installed. |
OlderNewer