Skip to content

Instantly share code, notes, and snippets.

#!/bin/ksh93
GIT_MODULES="app/* data/* doc/* driver/* font/* lib/* mesa/* proto/* util/* xcb/* pixman"
TOP=$(pwd)
for d in $GIT_MODULES ; do
if [[ -d "$TOP/$d/.git" && ! -f "$TOP/$d/NO-PULL" ]] ; then
cd $TOP/$d
HEAD_DESC="$(git describe)"
@alanc
alanc / changes-between-tags.pl
Created November 11, 2010 01:22
Script I use to make X.Org katamari unified changelogs from the collected git repos
#! /usr/perl5/5.10.0/bin/perl -w
#
# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
@alanc
alanc / xkbcasetest.c
Created October 26, 2013 20:30
libxkbfile text program to print XkbKSIsLower() and XkbKSIsUpper() results for ranges of keysyms.
/*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
| From: "Roger A. Faulkner" <Roger.Faulkner@Eng>
| Subject: Re: curiosity: truss?
| Date: Wed, 27 Jan 1999 23:34:47 -0800 (PST)
|
| For your edification, this is the geneaology of the name "truss"
| (taken from some mail dated Sep 26, 1988)
| This was when Ron Gomes and I were jointly developing the first
| /proc for SVR4 at USL.
| -----------------------------------------------------------------
|
@alanc
alanc / prtconf-v.txt
Created February 3, 2018 20:42
Sample output from prtconf -v on Solaris 11.4 beta
System Configuration: Oracle Corporation i86pc
Memory size: 18423 Megabytes
System Peripherals (Software Nodes):
i86pc
Driver properties:
name='fm-accchk-capable' type=boolean dev=none
name='fm-dmachk-capable' type=boolean dev=none
name='fm-ereport-capable' type=boolean dev=none
name='fm-errcb-capable' type=boolean dev=none
@alanc
alanc / param-check.csh
Created August 18, 2018 17:19
Compare <parameter> tags listed in synopsis of SolBook man page with those in the body
mkdir /tmp/params
foreach f ( on/en/xman2/*xml on/en/xman3c/*xml )
echo "cat //synopsis/parameter" | xmllint --loaddtd --nonet --path /usr/share/xml/xsolbook \
--path /usr/share/xml/xsolbook/entities --path /usr/share/xml/xsolbook/entities/en --shell $f \
| perl -n -e 'print $1, "\n" if m{<parameter>(.*)</parameter>}' | sort -u > /tmp/params/${f:t}-syn
echo "cat //parameter" | xmllint --loaddtd --nonet --path /usr/share/xml/xsolbook --path \
/usr/share/xml/xsolbook/entities --path /usr/share/xml/xsolbook/entities/en --shell $f \
| perl -n -e 'print $1, "\n" if m{<parameter>(.*)</parameter>}' | sort -u > /tmp/params/${f:t}-all
diff -u /tmp/params/${f:t}-syn /tmp/params/${f:t}-all >> /tmp/params/diffs
end
@alanc
alanc / dlmalloc.c
Created February 1, 2019 23:51
How to tell which library a function is from
#include <dlfcn.h>
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv)
{
void *sym;
Dl_info_t dlip;
sym = dlsym(RTLD_PROBE, "malloc");
.\" @(#)cstyle.ms 1.8 96/08/19 SMI
.ND 96/08/19
.RP
.TL
C Style and Coding Standards for SunOS
.br
.AU
Bill Shannon
.AI
Copyright \(co 1993 by Sun Microsystems, Inc.

Keybase proof

I hereby claim:

  • I am alanc on github.
  • I am acoopersmith (https://keybase.io/acoopersmith) on keybase.
  • I have a public key ASCTM--5EC4sHyTAJOrzFXoUW3CGAo5ZWYfafFiyv2mh5Ao

To claim this, I am signing this object:

@alanc
alanc / gist:977ee7cc8a7aa81cd5f52b71644edc45
Created July 18, 2019 18:38
closefrom() in Solaris 11.4
Oracle Corporation SunOS 5.11 11.4 June 2019
solaris% cd /tmp
solaris% cat > closefrom.c
#include <stdlib.h>
int main() {
closefrom(3);
}
solaris% cc -o closefrom closefrom.c
solaris% truss -u :: ./closefrom