Skip to content

Instantly share code, notes, and snippets.

Alan Coopersmith alanc

Block or report user

Report or block alanc

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View changes-since-last-tag.sh
#!/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 Nov 11, 2010
Script I use to make X.Org katamari unified changelogs from the collected git repos
View changes-between-tags.pl
#! /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 Oct 26, 2013
libxkbfile text program to print XkbKSIsLower() and XkbKSIsUpper() results for ranges of keysyms.
View xkbcasetest.c
/*
* 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:
*
View truss-name.txt
| 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 Feb 3, 2018
Sample output from prtconf -v on Solaris 11.4 beta
View prtconf-v.txt
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 Aug 18, 2018
Compare <parameter> tags listed in synopsis of SolBook man page with those in the body
View param-check.csh
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 Feb 1, 2019
How to tell which library a function is from
View dlmalloc.c
#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");
View cstyle.ms
.\" @(#)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.
View keybase.md

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:

View gist:977ee7cc8a7aa81cd5f52b71644edc45
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
You can’t perform that action at this time.