From 493193872f85ebfe51e83eb017f693bcb42cfcea Mon Sep 17 00:00:00 2001 From: Edward Shen Date: Thu, 23 Jul 2020 22:04:24 -0400 Subject: [PATCH] updates --- Cargo.lock | 12 +++++ Cargo.toml | 1 + config.json5 | 126 ++++++++++++++++++++++++++++++++++++++++++++++++ src/main.rs | 5 +- templates/latex | 27 +++++------ 5 files changed, 153 insertions(+), 18 deletions(-) create mode 100644 config.json5 diff --git a/Cargo.lock b/Cargo.lock index 39a7bc6..a79d726 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -348,6 +348,16 @@ name = "itoa" version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "json5" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "pest 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "pest_derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "kernel32-sys" version = "0.2.2" @@ -500,6 +510,7 @@ version = "0.1.0" dependencies = [ "clap 2.33.1 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "json5 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "notify 5.0.0-pre.3 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.56 (registry+https://github.com/rust-lang/crates.io-index)", @@ -927,6 +938,7 @@ dependencies = [ "checksum inotify-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e74a1aa87c59aeff6ef2cc2fa62d41bc43f54952f55652656b18a02fd5e356c0" "checksum iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" "checksum itoa 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6" +"checksum json5 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8eb2522ff59fbfefb955e9bd44d04d5e5c2d0e8865bfc2c3d1ab3916183ef5ee" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" "checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" diff --git a/Cargo.toml b/Cargo.toml index 3b562a0..d2618c9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,5 +9,6 @@ tera = "1.0.0-beta.13" clap = "2" serde = "1" serde_json = "1.0" +json5 = "0.2.8" notify = "5.0.0-pre.3" crossbeam = "0.7" diff --git a/config.json5 b/config.json5 new file mode 100644 index 0000000..38c9db9 --- /dev/null +++ b/config.json5 @@ -0,0 +1,126 @@ +{ + "author": { + "name": "Edward Shen", + "addresses": { + "home": "8080 Highland Farms Drive, East Amherst, NY 14051", + "school": "480 Parker Street, Boston, MA 02115" + }, + "email": "code@eddie.sh", + "phone": "(716) 491-3343", + "website": "eddie.sh", + "github": "edward-shen", + "location": "Buffalo, NY" + }, + "available": { + "start": "August", + "end": "December 2020" + }, + "education": { + "school": "Northeastern University", + "college": "Khoury College of Computer Sciences", + "location": "Boston, MA", + "start": "Sept. 2017", + "end": "Present", + "end_date": "Present (May 2021)", + "list": [ + { + "name": "degree", + "desc": "Candidate for a Bachelor of Science in Computer Science" + }, + { + "name": "honors", + "desc": "3.84 / 4.00, Dean's List" + }, + { + "name": "courses", + "desc": "Data Collection, Integration, and Analysis; Machine Learning/Data Mining 1; Algorithms and Data; Object-Oriented Design; Networks and Distributed Systems" + } + ] + }, + "skills": [ + { + "name": "languages", + "desc": [ + { + "level": "proficient", + "langs": "Rust, Python, TypeScript, HTML5, CSS" + }, + { + "level": "familiar", + "langs": "JavaScript, Java, LaTeX, C++, Bash" + }, + { + "level": "explored", + "langs": "C, Ruby, Racket, Scala" + } + ] + }, + { + "name": "other", + "desc": "Git, (Arch) Linux, VS Code, Raspberry Pi" + }, + { + "name": "certs", + "desc": "CompTIA A+, Dell Certified Technician, Apple Certified Mac Technician" + } + ], + "experiences": [ + // { + // "title": "Software Development Engineer Intern", + // "company": "Apple", + // "location": "Menlo Park, CA", + // "start": "Aug. 2020", + // "end": "Dec. 2020", + // "notes": [ + // "sekureetee" + // ] + // }, + { + "title": "Production Engineer Intern", + "company": "Facebook", + "location": "Menlo Park, CA", + "start": "May 2020", + "end": "Aug. 2020", + "notes": [ + "Rewritten Python config generation in multithreaded asynchronous Rust, reducing overall runtime by 80\\% on large inputs and improving runtime of profiled areas by a factor of 36.6.", + "Designed core Rust libraries for foundational services for ubiquitous use across all Rust applications.", + "Detected and resolved soundness issues and misconfigurations in existing python code to preempt Severity 1 site events." + ] + }, + { + "title": "Software Engineer Intern", + "company": "Datto", + "location": "Boston, MA", + "start": "Aug. 2019", + "end": "Dec. 2019", + "notes": [ + "Refactored frontend codebase to utilize Typescript, Webpack, and Babel while reducing average JS footprint by 98\\% percent, from 10.4MB to 250KB.", + "Assisted and completed developer environment virtualization project to reduce onboarding time for new developers by 5 days.", + "Integrated into Scrum team that focused on re-implementation of license management systems in a legacy Ruby codebase to Scala and PHP." + ] + }, + { + "title": "Production Engineer Intern", + "company": "Facebook", + "location": "Seattle, WA", + "start": "May 2019", + "end": "Aug. 2019", + "notes": [ + "Implemented a disaster mitigation for decentralized service discovery when upstream data source is unavailable or in a degraded state.", + "Designed an out-of-band flow to allow resolution of core infrastructure services dependent on service discovery in disaster scenarios to minimize downtime for all Facebook products.", + "Modernized and restructured core tooling to improve reliability and testing." + ] + } + ], + "projects": [ + { + "name": "Bunbun", + "lang": "Rust", + "notes": [ + "Multithreaded search and jump multiplexer service that provides a command-like interface for all modern browsers.", + "Allows for defining arbitrary commands and shortcuts on a per-instance basis for arbitrary locations and search engines.", + "Fully extensible plugin system to support functionality beyond the out-of-box experience." + ] + } + ] +} \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index cb37652..547bcf3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,8 +2,9 @@ use clap::{crate_authors, crate_version, App, AppSettings, Arg}; use crossbeam::crossbeam_channel::unbounded; +use json5::from_str; use notify::{RecommendedWatcher, RecursiveMode, Watcher}; -use serde_json::{from_str, Value}; +use serde_json::Value; use std::env; use std::error::Error; use std::fs::{create_dir_all, read_dir, read_to_string, write}; @@ -28,7 +29,7 @@ fn env_or_default(env_name: &str, default: &str) -> String { } fn run() -> Result<(), Box> { - let config: Value = from_str(&read_to_string("config.json")?)?; + let config: Value = from_str(&read_to_string("config.json5")?)?; let template_dir = env_or_default("PANRES_TEMPLATE_DIR", DEFAULT_TEMPLATE_DIR); let output_dir = env_or_default("PANRES_OUTPUT_DIR", DEFAULT_OUTPUT_DIR); diff --git a/templates/latex b/templates/latex index d8d4a47..dde6f3a 100644 --- a/templates/latex +++ b/templates/latex @@ -24,22 +24,17 @@ % Set up table styles \arrayrulecolor{red} \setlength\arrayrulewidth{1.2pt} -\begin{tabularx}{\textwidth}{l X r} -{% raw -%} -\name && \large\title{% -{% endraw -%} -{{ config.available.start }}—{{ config.available.end }}} \\[-2pt] +\begin{tabularx}{\textwidth}{X c l} + \multirow[b]{3}{*}{\name} + & \accent{\glyph{"F0AC}} & {{ config.author.website }} \\ + & \accent{\glyph{"F003}} & {{ config.author.email }} \\ + & \accent{\glyph{"F09B}} & {{ config.author.github }} \end{tabularx} % Contact info -\begin{tabularx}{\textwidth}{ c X c l } - \accent{\glyph{"F015}} & {{ config.author.addresses.home }} & \accent{\glyph{"F095}} & {{ config.author.phone }} \\ - \accent{\glyph{"F19C}} & {{ config.author.addresses.school }} & \accent{\glyph{"F003}} & {{ config.author.email }} \\ - \accent{\glyph{"F0AC}} & {{ config.author.website }} & \accent{\glyph{"F126}} & {{ config.author.github }} -\end{tabularx} \begin{tabularx}{\textwidth}{ c | r X r } -\sectiontitle{Education} +\sectiontitle{Education} \\[-8pt] {% raw -%} & \widel{ {\large\title{% {% endraw -%} @@ -58,7 +53,7 @@ \spacer -\sectiontitle{Skills} +\sectiontitle{Skills} \\[-8pt] {% for row in config.skills -%} & \hint{ {{ row.name | title }}:} & {% raw -%} @@ -83,12 +78,12 @@ \end{tabularx} \begin{tabularx}{\textwidth}{c | r X r } -\sectiontitle{Experience} -{% for experience in config.experiences -%} +\sectiontitle{Experiences} +{% for experience in config.experiences -%} \\[-8pt] {% raw -%} & \widel{\large\title{% {% endraw -%} -{{ experience.title }}}\hint{ {{experience.company }} }} & {{ experience.start }}---{{ experience.end }} \\ +{{ experience.company }}}\hint{ {{experience.title }} }} & {{ experience.start }}---{{ experience.end }} \\ & \widel{\footnotesize {{ experience.location }}} \\ {% for note in experience.notes -%} & \bullet @@ -102,7 +97,7 @@ \begin{tabularx}{\textwidth}{c | r X r } \sectiontitle{Projects} -{% for project in config.projects -%} +{% for project in config.projects -%} \\[-8pt] {% raw -%} & \widel{\large\title{% {% endraw -%}