Skip to content

Instantly share code, notes, and snippets.

@daschr
daschr / monotimer.png
Last active September 3, 2022 07:39
monotimer
monotimer.png
@daschr
daschr / update-ldif-cs.c
Last active August 3, 2021 09:34
update crc-32 of ldif files
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <zlib.h>
#define BUFSIZE 256
@daschr
daschr / initials.c
Last active March 13, 2021 15:28
DS
#include <stdio.h>
#include <math.h>
#include <unistd.h>
#include <string.h>
void rotate(float *l, double deg, float *n);
int main(void)
{
float d[] = {-6.,-17.,0.,-5.,-17.,0.,-4.,-17.,0.,-3.,-17.,0.,-2.,-17.,0.,-1.,-17.,0.,0.,-17.,0.,1.,-17.,0.,2.,-17.,0.,3.,-17.,0.,4.,-17.,0.,5.,-17.,0.,6.,-17.,0.,-6.,-18.,0.,-5.,-18.,0.,-4.,-18.,0.,-3.,-18.,0.,-2.,-18.,0.,-1.,-18.,0.,0.,-18.,0.,1.,-18.,0.,2.,-18.,0.,3.,-18.,0.,4.,-18.,0.,5.,-18.,0.,6.,-18.,0.,-2.,-7.,0.,-2.,-6.,0.,-1.,-6.,0.,0.,-6.,0.,1.,-6.,0.,2.,-6.,0.,2.,-7.,0.,-1.,-5.,0.,0.,-5.,0.,1.,-5.,0.,-6.,-16.,0.,-6.,-15.,0.,-6.,-14.,0.,-6.,-13.,0.,-5.,-12.,0.,-5.,-11.,0.,-4.,-11.,0.,-4.,-11.,0.,-4.,-10.,0.,-4.,-9.,0.,-3.,-9.,0.,-3.,-8.,0.,-3.,-7.,0.,6.,-16.,0.,6.,-15.,0.,6.,-14.,0.,6.,-13.,0.,5.,-12.,0.,5.,-11.,0.,5.,-11.,0.,4.,-11.,0.,4.,-10.,0.,4.,-9.,0.,3.,-9.,0.,3.,-8.,0.,3.,-7.,0.,-4.,-1.,0.,-3.,-1.,0.,-2.,-1.,0.,-4.,0.,0.,-3.,0.,0.,-2.,0.,0.,-6.,5.,0.,-6.,6.,0.,-6.,7.,0.,-6.,8.,0.,-6.,9.,0.,-6.,10.,0.,-6.,11.,0.,-6.,12.,0.,-5.,1.,0.,-5.,2.,0.,-5.,3.,0
/*
Copyright (c) <2021> <David Schramm <[email protected]>>
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:
#!/bin/bash
# [ "$#" -lt "1" ] && { echo "Usage: $0 [file1] [file2] ..." >&2; exit 1; }
case "$#" in
0)
ccze -A | less -R
;;
*)
args=($@)
for (( i=0; i < $#; i++ )); do
[ -e "${args[$i]}" ] && { ccze -A < "${args[$i]}" | less -R; }