Skip to content

Instantly share code, notes, and snippets.

View aaaronic's full-sized avatar
Verified Person

Aaron Hansen aaaronic

Verified Person
View GitHub Profile
@aaaronic
aaaronic / main.c
Created April 13, 2020 19:38
Linked List Demo
// compiled and run via gcc on Linux/Mac: gcc main.c && ./a.out
// on windows (Cygwin)... gcc main.c && ./a.exe
#include <stdio.h>
#include <limits.h>
#include <stdlib.h>
#define SUCCESS 0
#define MALLOCFAIL 1
#define INDEXOUTOFBOUNDS INT_MAX
@aaaronic
aaaronic / main.c
Last active April 8, 2020 20:05
Dynamic memory tiny demo
// I rand this with gcc -std=c99 main.c && ./a.exe on Windows (cygwin)
// Mac/Linux people would probably prefer gcc -std=c99 main.c && ./a.out
#include <stdlib.h>
#include <stdio.h>
int main() {
printf("The size of an int is %d\n\n", sizeof(int));
int* ptr1 = malloc(1000*sizeof(*ptr1));
@aaaronic
aaaronic / keybase.md
Last active December 11, 2015 02:33
keybase.md

Keybase proof

I hereby claim:

  • I am aaaronic on github.
  • I am ahansen (https://keybase.io/ahansen) on keybase.
  • I have a public key whose fingerprint is 51A3 8E3C 20B3 BA59 FA56 733B 56B6 F5C3 EFC6 ADEB

To claim this, I am signing this object:

@aaaronic
aaaronic / Fix Comcast Support Chat
Created November 2, 2013 03:03
Comcast online chat support service refusing to scroll to the bottom of the chat content div automatically when messages arrive from the "analyst" (might just be a Chrome bug, I'm not sure)? Paste the (admittedly simplistic) script into the js console, so you can focus back onto the real task at hand.
(function (window, jQuery) {
var div = document.getElementById("ChatOutput");
function fixIt() {
div.scrollTop = div.scrollHeight;
}
if (div) {
window.setInterval(fixIt, 100);
}
})(window, jQuery);
@aaaronic
aaaronic / README.md
Last active December 15, 2015 01:19 — forked from bollwyvl/README.md
Collapsible Area Plot Matrix

Shows use of .transition() with .transform()