Skip to content

Instantly share code, notes, and snippets.

@STCollier
Last active July 27, 2025 02:25
Show Gist options
  • Select an option

  • Save STCollier/0055f66245ac3ca491610a3727314e89 to your computer and use it in GitHub Desktop.

Select an option

Save STCollier/0055f66245ac3ca491610a3727314e89 to your computer and use it in GitHub Desktop.
Prints the time in the terminal using colored 3x5 blocks
#import<time.h>
a[5];r=5;j;i=5;p(n){a[--i]=n/10;a[--i]=n%10;}q(x){printf("\33[%dm ",x);}main(c){auto t=time(0);auto d=localtime(&t);p(d->tm_hour);a[--i]=10;for(p(d->tm_min);r--;puts(""))for(j=5;j--;q(0))for(c=3;c--;)(int[]){63198,59692,62366,59294,10202,59342,63438,9374,63454,10206,2080}[a[j]]>>15-(r*3-c+2)&1?q(41):q(0);}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment