Skip to content

Instantly share code, notes, and snippets.

@klange
Last active December 23, 2024 14:40

Revisions

  1. klange revised this gist Mar 27, 2018. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions resume.c
    Original file line number Diff line number Diff line change
    @@ -29,10 +29,10 @@ typedef thing_t project_t;
    #define CURRENT 0 /* I wasn't alive at the Unix epoch, so that'll work */

    /* Contact Information */
    const char * name = "Kevin R. Lange";
    const char * name = "K. Lange";
    const char * email = "klange@toaruos.org";
    const char * address = "1045 Mission St, Apt 440\n"
    "San Francisco, CA 94103";
    const char * address = "3-5-19-903 Kotobashi, Sumida\n"
    "Tokyo, Japan 130-0022";

    /* Education */
    school_t uiuc = {
  2. klange revised this gist Feb 10, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion _.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    Since this is on Hacker News and reddit...

    - No, I don't distribute my résumé like this. A [friend of mine](https://twitter.com/eevee) made a [joke about me being the kind of person who would do this](http://eev.ee/blog/2013/01/09/cvs-and-file-extensions/), so I did (the link on that page was added later). My actual résumé is [written in BSD mandoc](http://r.dakko.us).
    - No, I don't distribute my résumé like this. A [friend of mine](https://twitter.com/eevee) made a [joke about me being the kind of person who would do this](http://eev.ee/blog/2013/01/09/cvs-and-file-extensions/), so I did (the link on that page was added later). My actual résumé is [a good bit crazier](http://r.dakko.us).
    - I apologize for the use of `_t` in my types. I spend a lot of time at a level where I can do that; "reserved for system libraries? I *am* the system libraries".
    - Since people kept complaining, I've fixed the assignments of string literals to non-const `char *`s.
    - My use of `type * name`, however, is [entirely intentional](https://github.com/klange/toaruos/wiki/Styleguide).
  3. klange revised this gist Mar 17, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion _.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    Since this is on Hacker News...
    Since this is on Hacker News and reddit...

    - No, I don't distribute my résumé like this. A [friend of mine](https://twitter.com/eevee) made a [joke about me being the kind of person who would do this](http://eev.ee/blog/2013/01/09/cvs-and-file-extensions/), so I did (the link on that page was added later). My actual résumé is [written in BSD mandoc](http://r.dakko.us).
    - I apologize for the use of `_t` in my types. I spend a lot of time at a level where I can do that; "reserved for system libraries? I *am* the system libraries".
  4. klange revised this gist Mar 17, 2015. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion _.md
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,8 @@ Since this is on Hacker News...

    - No, I don't distribute my résumé like this. A [friend of mine](https://twitter.com/eevee) made a [joke about me being the kind of person who would do this](http://eev.ee/blog/2013/01/09/cvs-and-file-extensions/), so I did (the link on that page was added later). My actual résumé is [written in BSD mandoc](http://r.dakko.us).
    - I apologize for the use of `_t` in my types. I spend a lot of time at a level where I can do that; "reserved for system libraries? I *am* the system libraries".
    - To avoid pointless arguments about them, I've corrected several things since this originally showed up on various social networks.
    - Since people kept complaining, I've fixed the assignments of string literals to non-const `char *`s.
    - My use of `type * name`, however, is [entirely intentional](https://github.com/klange/toaruos/wiki/Styleguide).
    - If you're using an older compiler, you might have trouble with the anonymous unions and the designated initializers - I think gcc 4.4 requires some extra braces to get them working together. Anything reasonably recent should work fine. Clang and gcc (newer than 4.4, at least...) support both of these features in their default configurations.
    - Since it's been mentioned by multiple people, I used timestamps instead of building `struct tm`s as a stylistic choice.
    - As a final reminder, this is a joke.
  5. klange revised this gist Mar 17, 2015. 2 changed files with 27 additions and 31 deletions.
    4 changes: 2 additions & 2 deletions _.md
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@ Since this is on Hacker News...

    - No, I don't distribute my résumé like this. A [friend of mine](https://twitter.com/eevee) made a [joke about me being the kind of person who would do this](http://eev.ee/blog/2013/01/09/cvs-and-file-extensions/), so I did (the link on that page was added later). My actual résumé is [written in BSD mandoc](http://r.dakko.us).
    - I apologize for the use of `_t` in my types. I spend a lot of time at a level where I can do that; "reserved for system libraries? I *am* the system libraries".
    - They're all `while` loops because shut up, you're overthinking a joke. Same for the `const` correctness.
    - To avoid pointless arguments about them, I've corrected several things since this originally showed up on various social networks.
    - My use of `type * name`, however, is [entirely intentional](https://github.com/klange/toaruos/wiki/Styleguide).
    - If you're using an older compiler, you might have trouble with the anonymous unions and the designated initializers - I think gcc 4.4 requires some extra braces to get them working together. Anything reasonably recent should work fine. Clang and gcc (newer than 4.4, at least...) support both of these features in their default configurations.
    - Since it's been mentioned by multiple people, I used timestamps instead of building `struct tm`s as a stylistic choice.
    - Since it's been mentioned by multiple people, I used timestamps instead of building `struct tm`s as a stylistic choice.
    54 changes: 25 additions & 29 deletions resume.c
    Original file line number Diff line number Diff line change
    @@ -3,23 +3,23 @@

    typedef struct {
    union {
    char * company;
    char * school;
    char * project;
    const char * company;
    const char * school;
    const char * project;
    };
    union {
    char * location;
    char * url;
    const char * location;
    const char * url;
    };
    union {
    char * title;
    char * program;
    const char * title;
    const char * program;
    };

    time_t started;
    time_t left;

    char * description[];
    const char * description[];
    } thing_t;

    typedef thing_t job_t;
    @@ -29,10 +29,10 @@ typedef thing_t project_t;
    #define CURRENT 0 /* I wasn't alive at the Unix epoch, so that'll work */

    /* Contact Information */
    char * name = "Kevin R. Lange";
    char * email = "klange@toaruos.org";
    char * address = "1045 Mission St, Apt 440\n"
    "San Francisco, CA 94103";
    const char * name = "Kevin R. Lange";
    const char * email = "klange@toaruos.org";
    const char * address = "1045 Mission St, Apt 440\n"
    "San Francisco, CA 94103";

    /* Education */
    school_t uiuc = {
    @@ -142,49 +142,45 @@ void print_thing(thing_t * thing) {
    printf("%s at %s - %s\n", thing->title, thing->company, thing->location);

    ti = localtime(&thing->started);
    strftime(started, 100, "%B %d, %Y", ti);
    strftime(started, sizeof(started), "%B %d, %Y", ti);

    if (thing->left == CURRENT) {
    printf("%s to now\n", started);
    } else {
    ti = localtime(&thing->left);
    strftime(left, 100, "%B %d, %Y", ti);
    strftime(left, sizeof(left), "%B %d, %Y", ti);
    printf("%s to %s\n", started, left);
    }

    char ** desc = thing->description;
    while (*desc) {
    const char ** desc;
    for (desc = thing->description; *desc; desc++) {
    printf("- %s\n", *desc);
    desc++;
    }

    puts("");
    }

    int main(int argc, char ** argv) {

    school_t ** s;
    job_t ** j;
    project_t ** p;

    printf("%s\n%s\n%s\n\n", name, email, address);

    puts("Education\n");
    school_t ** s = schools;
    while (*s) {
    for (s = schools; *s; s++) {
    print_thing(*s);
    puts("");
    s++;
    }

    puts("Employment\n");
    job_t ** j = jobs;
    while (*j) {
    for (j = jobs; *j; j++) {
    print_thing(*j);
    puts("");
    j++;
    }

    puts("Projects\n");
    project_t ** p = projects;
    while (*p) {
    for (p = projects; *p; p++) {
    print_thing(*p);
    puts("");
    p++;
    }

    return 0;
  6. klange revised this gist Mar 17, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion _.md
    Original file line number Diff line number Diff line change
    @@ -4,5 +4,5 @@ Since this is on Hacker News...
    - I apologize for the use of `_t` in my types. I spend a lot of time at a level where I can do that; "reserved for system libraries? I *am* the system libraries".
    - They're all `while` loops because shut up, you're overthinking a joke. Same for the `const` correctness.
    - My use of `type * name`, however, is [entirely intentional](https://github.com/klange/toaruos/wiki/Styleguide).
    - If you're using an older compiler, you might have trouble with the anonymous unions and the designated initializers - I think gcc 4.4 requires some extra braces to get them working together. Anything reasonably recent should work fine. Clang and gcc (newer than 4.4, at least...) support both of these as features in their default configurations.
    - If you're using an older compiler, you might have trouble with the anonymous unions and the designated initializers - I think gcc 4.4 requires some extra braces to get them working together. Anything reasonably recent should work fine. Clang and gcc (newer than 4.4, at least...) support both of these features in their default configurations.
    - Since it's been mentioned by multiple people, I used timestamps instead of building `struct tm`s as a stylistic choice.
  7. klange revised this gist Mar 17, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion _.md
    Original file line number Diff line number Diff line change
    @@ -3,6 +3,6 @@ Since this is on Hacker News...
    - No, I don't distribute my résumé like this. A [friend of mine](https://twitter.com/eevee) made a [joke about me being the kind of person who would do this](http://eev.ee/blog/2013/01/09/cvs-and-file-extensions/), so I did (the link on that page was added later). My actual résumé is [written in BSD mandoc](http://r.dakko.us).
    - I apologize for the use of `_t` in my types. I spend a lot of time at a level where I can do that; "reserved for system libraries? I *am* the system libraries".
    - They're all `while` loops because shut up, you're overthinking a joke. Same for the `const` correctness.
    - My use of `type * name` is [entirely intentional](https://github.com/klange/toaruos/wiki/Styleguide).
    - My use of `type * name`, however, is [entirely intentional](https://github.com/klange/toaruos/wiki/Styleguide).
    - If you're using an older compiler, you might have trouble with the anonymous unions and the designated initializers - I think gcc 4.4 requires some extra braces to get them working together. Anything reasonably recent should work fine. Clang and gcc (newer than 4.4, at least...) support both of these as features in their default configurations.
    - Since it's been mentioned by multiple people, I used timestamps instead of building `struct tm`s as a stylistic choice.
  8. klange revised this gist Mar 17, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions _.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    Since this is on Hacker News...

    - No, I don't distribute my résumé like this. A [friend of mine](https://twitter.com/eevee) made a [joke about me being the kind of person who would do this](http://eev.ee/blog/2013/01/09/cvs-and-file-extensions/), so I did (the link on that page was added later).
    - I apologize for the use of `_t` in my types. I spend a lot of time at a level where I can do that; "reserved for system libraries? I *am* the system libraries". My actual résumé is [written in BSD mandoc](http://r.dakko.us).
    - No, I don't distribute my résumé like this. A [friend of mine](https://twitter.com/eevee) made a [joke about me being the kind of person who would do this](http://eev.ee/blog/2013/01/09/cvs-and-file-extensions/), so I did (the link on that page was added later). My actual résumé is [written in BSD mandoc](http://r.dakko.us).
    - I apologize for the use of `_t` in my types. I spend a lot of time at a level where I can do that; "reserved for system libraries? I *am* the system libraries".
    - They're all `while` loops because shut up, you're overthinking a joke. Same for the `const` correctness.
    - My use of `type * name` is [entirely intentional](https://github.com/klange/toaruos/wiki/Styleguide).
    - If you're using an older compiler, you might have trouble with the anonymous unions and the designated initializers - I think gcc 4.4 requires some extra braces to get them working together. Anything reasonably recent should work fine. Clang and gcc (newer than 4.4, at least...) support both of these as features in their default configurations.
  9. klange revised this gist Mar 17, 2015. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions _.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,8 @@
    Since this is on Hacker News...

    - No, I don't distribute my résumé like this. A [friend of mine](https://twitter.com/eevee) made a [joke about me being the kind of person who would do this](http://eev.ee/blog/2013/01/09/cvs-and-file-extensions/), so I did (the link on that page was added later).
    - I apologize for the use of `_t` in my types. I spend a lot of time at a level where I can do that; "reserved for system libraries? I *am* the system libraries".
    - I apologize for the use of `_t` in my types. I spend a lot of time at a level where I can do that; "reserved for system libraries? I *am* the system libraries". My actual résumé is [written in BSD mandoc](http://r.dakko.us).
    - They're all `while` loops because shut up, you're overthinking a joke. Same for the `const` correctness.
    - My use of `type * name` is [entirely intentional](https://github.com/klange/toaruos/wiki/Styleguide).
    - My use of `type * name` is [entirely intentional](https://github.com/klange/toaruos/wiki/Styleguide).
    - If you're using an older compiler, you might have trouble with the anonymous unions and the designated initializers - I think gcc 4.4 requires some extra braces to get them working together. Anything reasonably recent should work fine. Clang and gcc (newer than 4.4, at least...) support both of these as features in their default configurations.
    - Since it's been mentioned by multiple people, I used timestamps instead of building `struct tm`s as a stylistic choice.
  10. klange revised this gist Mar 17, 2015. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion resume.c
    Original file line number Diff line number Diff line change
    @@ -138,7 +138,6 @@ void print_thing(thing_t * thing) {
    char started[100];
    char left[100];
    struct tm * ti;
    int i = 0;

    printf("%s at %s - %s\n", thing->title, thing->company, thing->location);

  11. klange revised this gist Mar 17, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion resume.c
    Original file line number Diff line number Diff line change
    @@ -56,7 +56,7 @@ school_t hit = {
    .left = 1278288000,
    .description = {
    "Cultural exchange program",
    "Intensive language course"
    "Intensive language course",
    NULL
    }
    };
  12. klange revised this gist Mar 17, 2015. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions resume.c
    Original file line number Diff line number Diff line change
    @@ -56,6 +56,7 @@ school_t hit = {
    .left = 1278288000,
    .description = {
    "Cultural exchange program",
    "Intensive language course"
    NULL
    }
    };
  13. klange revised this gist Mar 17, 2015. No changes.
  14. klange revised this gist Mar 17, 2015. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion _.md
    Original file line number Diff line number Diff line change
    @@ -2,4 +2,5 @@ Since this is on Hacker News...

    - No, I don't distribute my résumé like this. A [friend of mine](https://twitter.com/eevee) made a [joke about me being the kind of person who would do this](http://eev.ee/blog/2013/01/09/cvs-and-file-extensions/), so I did (the link on that page was added later).
    - I apologize for the use of `_t` in my types. I spend a lot of time at a level where I can do that; "reserved for system libraries? I *am* the system libraries".
    - They're all `while` loops because shut up, you're overthinking a joke.
    - They're all `while` loops because shut up, you're overthinking a joke. Same for the `const` correctness.
    - My use of `type * name` is [entirely intentional](https://github.com/klange/toaruos/wiki/Styleguide).
  15. klange revised this gist Mar 17, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions _.md
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    Since this is on Hacker News...

    - No, I don't distribute my résumé like this. A [friend of mine](https://twitter.com/eevee) made a [joke about me being the kind of person who would do this](http://eev.ee/blog/2013/01/09/cvs-and-file-extensions/), so I did (the link on that page was added later).
    - I apologize for the use of `_t` in my types. I spend a lot of time at a level where I can do that; I joke "I'm the one it's reserved for".
    - They're all `while` loops because shut up, you're overthinking a joke.
    - I apologize for the use of `_t` in my types. I spend a lot of time at a level where I can do that; "reserved for system libraries? I *am* the system libraries".
    - They're all `while` loops because shut up, you're overthinking a joke.
  16. klange revised this gist Mar 17, 2015. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions _.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    Since this is on Hacker News...

    - No, I don't distribute my résumé like this. A [friend of mine](https://twitter.com/eevee) made a [joke about me being the kind of person who would do this](http://eev.ee/blog/2013/01/09/cvs-and-file-extensions/), so I did (the link on that page was added later).
    - I apologize for the use of `_t` in my types. I spend a lot of time at a level where I can do that; I joke "I'm the one it's reserved for".
    - They're all `while` loops because shut up, you're overthinking a joke.
  17. klange revised this gist Mar 17, 2015. 1 changed file with 0 additions and 6 deletions.
    6 changes: 0 additions & 6 deletions resume.c
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,6 @@
    #include <stdio.h>
    #include <time.h>

    /* TODO: resume.h */

    typedef struct {
    union {
    char * company;
    @@ -31,7 +29,6 @@ typedef thing_t project_t;
    #define CURRENT 0 /* I wasn't alive at the Unix epoch, so that'll work */

    /* Contact Information */

    char * name = "Kevin R. Lange";
    char * email = "klange@toaruos.org";
    char * address = "1045 Mission St, Apt 440\n"
    @@ -136,9 +133,6 @@ job_t * jobs[] = {
    NULL
    };


    /* TODO: resume-main.c */

    void print_thing(thing_t * thing) {
    char started[100];
    char left[100];
  18. klange revised this gist Mar 17, 2015. 1 changed file with 43 additions and 64 deletions.
    107 changes: 43 additions & 64 deletions resume.c
    Original file line number Diff line number Diff line change
    @@ -4,36 +4,29 @@
    /* TODO: resume.h */

    typedef struct {
    char * company;
    char * location;
    char * title;

    time_t started;
    time_t left;

    char * accomplishments[];
    } job_t;

    typedef struct {
    char * school;
    char * location;
    char * program;

    time_t started;
    time_t left;

    char * accomplishments[];
    } school_t;

    typedef struct {
    char * project;
    char * title;
    union {
    char * company;
    char * school;
    char * project;
    };
    union {
    char * location;
    char * url;
    };
    union {
    char * title;
    char * program;
    };

    time_t started;
    time_t left;

    char * description[];
    } project_t;
    } thing_t;

    typedef thing_t job_t;
    typedef thing_t school_t;
    typedef thing_t project_t;

    #define CURRENT 0 /* I wasn't alive at the Unix epoch, so that'll work */

    @@ -51,7 +44,7 @@ school_t uiuc = {
    .program = "BS Computer Science",
    .started = 1251158400,
    .left = 1336608000,
    .accomplishments = {
    .description = {
    "Minor in International Studies in Engineering, Japan",
    "Focused on systems software courses",
    NULL
    @@ -64,7 +57,7 @@ school_t hit = {
    .program = "Study Abroad",
    .started = 1274745600,
    .left = 1278288000,
    .accomplishments = {
    .description = {
    "Cultural exchange program",
    NULL
    }
    @@ -79,6 +72,7 @@ school_t * schools[] = {
    /* Projects */
    project_t compiz = {
    .project = "Compiz Window Manager",
    .url = "http://compiz.org",
    .title = "Developer",
    .started = 1201392000,
    .left = 1264291200,
    @@ -91,6 +85,7 @@ project_t compiz = {

    project_t toaruos = {
    .project = "ToAruOS",
    .url = "https://github.com/klange/toaruos",
    .title = "Lead",
    .started = 1295049600,
    .left = CURRENT,
    @@ -115,7 +110,7 @@ job_t yelp = {
    .title = "Software Engineer, i18n",
    .started = 1339977600,
    .left = CURRENT,
    .accomplishments = {
    .description = {
    "Developed several internal tools and libraries",
    "Provided critical input and design work for Yelp's launch in Japan",
    NULL
    @@ -128,7 +123,7 @@ job_t apple_internship = {
    .title = "Software Engineering Intern",
    .started = 1306886400,
    .left = 1314662400,
    .accomplishments = {
    .description = {
    "Built software framework for testing and verification of desktop retina display modes",
    "Assisted other interns with Unix fundamentals",
    NULL
    @@ -144,53 +139,29 @@ job_t * jobs[] = {

    /* TODO: resume-main.c */

    void print_job(job_t * job) {
    void print_thing(thing_t * thing) {
    char started[100];
    char left[100];
    struct tm * ti;
    int i = 0;

    printf("%s at %s in %s\n", job->title, job->company, job->location);
    printf("%s at %s - %s\n", thing->title, thing->company, thing->location);

    ti = localtime(&job->started);
    ti = localtime(&thing->started);
    strftime(started, 100, "%B %d, %Y", ti);

    if (job->left == CURRENT) {
    if (thing->left == CURRENT) {
    printf("%s to now\n", started);
    } else {
    ti = localtime(&job->left);
    ti = localtime(&thing->left);
    strftime(left, 100, "%B %d, %Y", ti);
    printf("%s to %s\n", started, left);
    }

    while (job->accomplishments[i]) {
    printf("- %s\n", job->accomplishments[i]);
    ++i;
    }
    }

    void print_school(school_t * school) {
    char started[100];
    char left[100];
    struct tm * ti;
    int i = 0;

    printf("%s at %s in %s\n", school->program, school->school, school->location);

    ti = localtime(&school->started);
    strftime(started, 100, "%B %d, %Y", ti);

    if (school->left == CURRENT) {
    printf("%s to now\n", started);
    } else {
    ti = localtime(&school->left);
    strftime(left, 100, "%B %d, %Y", ti);
    printf("%s to %s\n", started, left);
    }

    while (school->accomplishments[i]) {
    printf("- %s\n", school->accomplishments[i]);
    ++i;
    char ** desc = thing->description;
    while (*desc) {
    printf("- %s\n", *desc);
    desc++;
    }
    }

    @@ -201,18 +172,26 @@ int main(int argc, char ** argv) {
    puts("Education\n");
    school_t ** s = schools;
    while (*s) {
    print_school(*s);
    print_thing(*s);
    puts("");
    s++;
    }

    puts("Employment\n");
    job_t ** j = jobs;
    while (*j) {
    print_job(*j);
    print_thing(*j);
    puts("");
    j++;
    }

    puts("Projects\n");
    project_t ** p = projects;
    while (*p) {
    print_thing(*p);
    puts("");
    p++;
    }

    return 0;
    }
  19. klange revised this gist Mar 17, 2015. 1 changed file with 99 additions and 11 deletions.
    110 changes: 99 additions & 11 deletions resume.c
    Original file line number Diff line number Diff line change
    @@ -35,6 +35,8 @@ typedef struct {
    char * description[];
    } project_t;

    #define CURRENT 0 /* I wasn't alive at the Unix epoch, so that'll work */

    /* Contact Information */

    char * name = "Kevin R. Lange";
    @@ -68,15 +70,58 @@ school_t hit = {
    }
    };

    school_t * schools[] = {
    &uiuc,
    &hit,
    NULL
    };

    /* Projects */
    project_t compiz = {
    .project = "Compiz Window Manager",
    .title = "Developer",
    /* ... */
    .started = 1201392000,
    .left = 1264291200,
    .description = {
    "Minor plugin contributor",
    "Various research projects",
    NULL
    }
    };

    project_t toaruos = {
    .project = "ToAruOS",
    .title = "Lead",
    .started = 1295049600,
    .left = CURRENT,
    .description = {
    "Hobby x86 Unix-like kernel and userspace",
    "Advanced in-house GUI with compositing window manager",
    NULL
    }
    };

    project_t * projects[] = {
    &toaruos,
    &compiz,
    NULL
    };

    /* Employment History */

    job_t yelp = {
    .company = "Yelp, Inc.",
    .location = "San Francisco, CA",
    .title = "Software Engineer, i18n",
    .started = 1339977600,
    .left = CURRENT,
    .accomplishments = {
    "Developed several internal tools and libraries",
    "Provided critical input and design work for Yelp's launch in Japan",
    NULL
    }
    };

    job_t apple_internship = {
    .company = "Apple Inc.",
    .location = "Cupertino, CA",
    @@ -85,13 +130,13 @@ job_t apple_internship = {
    .left = 1314662400,
    .accomplishments = {
    "Built software framework for testing and verification of desktop retina display modes",
    "Assisted other interns in doing stuff.",
    "Foo bar",
    "Assisted other interns with Unix fundamentals",
    NULL
    }
    };

    job_t * jobs[] = {
    &yelp,
    &apple_internship,
    NULL
    };
    @@ -105,25 +150,68 @@ void print_job(job_t * job) {
    struct tm * ti;
    int i = 0;

    printf("%s at %s in %s\n", job->title, job->company, job->location);

    ti = localtime(&job->started);
    strftime(started, 100, "%B %d, %Y", ti);
    ti = localtime(&job->left);
    strftime(left, 100, "%B %d, %Y", ti);
    printf("%s at %s\t\t%s\n", job->title, job->company, job->location);
    printf("%s to %s\n", started, left);

    if (job->left == CURRENT) {
    printf("%s to now\n", started);
    } else {
    ti = localtime(&job->left);
    strftime(left, 100, "%B %d, %Y", ti);
    printf("%s to %s\n", started, left);
    }

    while (job->accomplishments[i]) {
    printf("- %s\n", job->accomplishments[i]);
    ++i;
    }
    }

    void print_school(school_t * school) {
    char started[100];
    char left[100];
    struct tm * ti;
    int i = 0;

    printf("%s at %s in %s\n", school->program, school->school, school->location);

    ti = localtime(&school->started);
    strftime(started, 100, "%B %d, %Y", ti);

    if (school->left == CURRENT) {
    printf("%s to now\n", started);
    } else {
    ti = localtime(&school->left);
    strftime(left, 100, "%B %d, %Y", ti);
    printf("%s to %s\n", started, left);
    }

    while (school->accomplishments[i]) {
    printf("- %s\n", school->accomplishments[i]);
    ++i;
    }
    }

    int main(int argc, char ** argv) {

    int i = 0;
    while (jobs[i]) {
    print_job(jobs[i]);
    i++;
    printf("%s\n%s\n%s\n\n", name, email, address);

    puts("Education\n");
    school_t ** s = schools;
    while (*s) {
    print_school(*s);
    puts("");
    s++;
    }

    puts("Employment\n");
    job_t ** j = jobs;
    while (*j) {
    print_job(*j);
    puts("");
    j++;
    }

    return 0;
  20. klange revised this gist Mar 17, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion resume.c
    Original file line number Diff line number Diff line change
    @@ -38,7 +38,7 @@ typedef struct {
    /* Contact Information */

    char * name = "Kevin R. Lange";
    char * email = "k@toaruos.org";
    char * email = "klange@toaruos.org";
    char * address = "1045 Mission St, Apt 440\n"
    "San Francisco, CA 94103";

  21. klange revised this gist Mar 17, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion resume.c
    Original file line number Diff line number Diff line change
    @@ -127,4 +127,4 @@ int main(int argc, char ** argv) {
    }

    return 0;
    }
    }
  22. klange revised this gist Mar 17, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion resume.c
    Original file line number Diff line number Diff line change
    @@ -118,7 +118,7 @@ void print_job(job_t * job) {
    }
    }

    int main(int argc, char * argv) {
    int main(int argc, char ** argv) {

    int i = 0;
    while (jobs[i]) {
  23. klange revised this gist Jan 9, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion resume.c
    Original file line number Diff line number Diff line change
    @@ -40,7 +40,7 @@ typedef struct {
    char * name = "Kevin R. Lange";
    char * email = "k@toaruos.org";
    char * address = "1045 Mission St, Apt 440\n"
    "San Francisco, CA 94103";
    "San Francisco, CA 94103";

    /* Education */
    school_t uiuc = {
  24. klange revised this gist Nov 9, 2012. 1 changed file with 74 additions and 0 deletions.
    74 changes: 74 additions & 0 deletions resume.c
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,8 @@
    #include <stdio.h>
    #include <time.h>

    /* TODO: resume.h */

    typedef struct {
    char * company;
    char * location;
    @@ -12,6 +14,68 @@ typedef struct {
    char * accomplishments[];
    } job_t;

    typedef struct {
    char * school;
    char * location;
    char * program;

    time_t started;
    time_t left;

    char * accomplishments[];
    } school_t;

    typedef struct {
    char * project;
    char * title;

    time_t started;
    time_t left;

    char * description[];
    } project_t;

    /* Contact Information */

    char * name = "Kevin R. Lange";
    char * email = "k@toaruos.org";
    char * address = "1045 Mission St, Apt 440\n"
    "San Francisco, CA 94103";

    /* Education */
    school_t uiuc = {
    .school = "University of Illinois at Urbana-Champaign",
    .location = "Urbana, IL",
    .program = "BS Computer Science",
    .started = 1251158400,
    .left = 1336608000,
    .accomplishments = {
    "Minor in International Studies in Engineering, Japan",
    "Focused on systems software courses",
    NULL
    }
    };

    school_t hit = {
    .school = "Hiroshima Institute of Technology",
    .location = "Hiroshima, Japan",
    .program = "Study Abroad",
    .started = 1274745600,
    .left = 1278288000,
    .accomplishments = {
    "Cultural exchange program",
    NULL
    }
    };

    /* Projects */
    project_t compiz = {
    .project = "Compiz Window Manager",
    .title = "Developer",
    /* ... */
    };

    /* Employment History */

    job_t apple_internship = {
    .company = "Apple Inc.",
    @@ -32,16 +96,26 @@ job_t * jobs[] = {
    NULL
    };


    /* TODO: resume-main.c */

    void print_job(job_t * job) {
    char started[100];
    char left[100];
    struct tm * ti;
    int i = 0;

    ti = localtime(&job->started);
    strftime(started, 100, "%B %d, %Y", ti);
    ti = localtime(&job->left);
    strftime(left, 100, "%B %d, %Y", ti);
    printf("%s at %s\t\t%s\n", job->title, job->company, job->location);
    printf("%s to %s\n", started, left);

    while (job->accomplishments[i]) {
    printf("- %s\n", job->accomplishments[i]);
    ++i;
    }
    }

    int main(int argc, char * argv) {
  25. klange revised this gist Nov 9, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion resume.c
    Original file line number Diff line number Diff line change
    @@ -38,7 +38,7 @@ void print_job(job_t * job) {
    struct tm * ti;
    ti = localtime(&job->started);
    strftime(started, 100, "%B %d, %Y", ti);
    ti = localtime(&job->started);
    ti = localtime(&job->left);
    strftime(left, 100, "%B %d, %Y", ti);
    printf("%s at %s\t\t%s\n", job->title, job->company, job->location);
    printf("%s to %s\n", started, left);
  26. klange created this gist Nov 9, 2012.
    56 changes: 56 additions & 0 deletions resume.c
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,56 @@
    #include <stdio.h>
    #include <time.h>

    typedef struct {
    char * company;
    char * location;
    char * title;

    time_t started;
    time_t left;

    char * accomplishments[];
    } job_t;


    job_t apple_internship = {
    .company = "Apple Inc.",
    .location = "Cupertino, CA",
    .title = "Software Engineering Intern",
    .started = 1306886400,
    .left = 1314662400,
    .accomplishments = {
    "Built software framework for testing and verification of desktop retina display modes",
    "Assisted other interns in doing stuff.",
    "Foo bar",
    NULL
    }
    };

    job_t * jobs[] = {
    &apple_internship,
    NULL
    };

    void print_job(job_t * job) {
    char started[100];
    char left[100];
    struct tm * ti;
    ti = localtime(&job->started);
    strftime(started, 100, "%B %d, %Y", ti);
    ti = localtime(&job->started);
    strftime(left, 100, "%B %d, %Y", ti);
    printf("%s at %s\t\t%s\n", job->title, job->company, job->location);
    printf("%s to %s\n", started, left);
    }

    int main(int argc, char * argv) {

    int i = 0;
    while (jobs[i]) {
    print_job(jobs[i]);
    i++;
    }

    return 0;
    }