Skip to content

Instantly share code, notes, and snippets.

@Michael-F-Bryan
Michael-F-Bryan / README.md
Last active August 3, 2021 11:43 — forked from kthakore/README.md
C/C++/Rust Task

Task

Design a simple system that allows HR to track the state of jobs, applications and candidates.

  1. Candiates can register themselves and apply for a job
  2. All applications go through state: applied, interviewed, rejected, accepted
  3. When an application is accepted the job can no longer be applied to

The final deliverable should be a command-line app written in Rust (preferred), otherwise C++ or C are acceptable.

Compiling carlogs v0.1.0 (file:///home/michael/Documents/carlogs-rs/carlogs)
warning: unused variable: `input`
--> carlogs/src/bin/carlogs-analysis.rs:109:24
|
109 | pub fn exec(&self, input: &mut Read, output: &mut Write, logger: &Logger) -> Result<(), Error> {
| ^^^^^ help: consider using `_input` instead
|
= note: #[warn(unused_variables)] on by default
warning: unused variable: `output`
@Michael-F-Bryan
Michael-F-Bryan / log.txt
Created January 5, 2018 06:17
ICE on stable when documenting `mdbook` as part of a travis job - https://api.travis-ci.org/v3/job/325306105/log.txt
travis_fold:start:worker_info
Worker information
hostname: 4ccba82d-3a09-488b-b50d-26226ba33200@1.production-1-worker-org-b-2-gce
version: v3.3.1 https://github.com/travis-ci/worker/tree/1153e5010ef9863bf96264b75fba506109633460
instance: travis-job-015b341d-695c-439e-84eb-bebdc062f094 travis-ci-amethyst-trusty-1512508224-986baf0 (via amqp)
startup: 21.253302171s
travis_fold:end:worker_info
mode of ‘/usr/local/clang-5.0.0/bin’ changed from 0777 (rwxrwxrwx) to 0775 (rwxrwxr-x)
travis_fold:start:system_info
Build system information
#!/bin/env python3
"""
Find all Rust code in markdown files and run `rustfmt` over them.
USAGE:
./rustfmt.py [<root_dir>]
"""
from pathlib import Path
@Michael-F-Bryan
Michael-F-Bryan / rust-internal-docs.sh
Created August 12, 2017 15:15
A small bash script for generating the latest docs for rustc and pushing them to GitHub pages
#!/bin/bash
#
# This is a small bash script which I use to generate a copy of `rustc`'s
# internal documentation and upload them to GitHub pages.
#
# Use at your own risk
#
# I typically have it set up as a cron job.
@Michael-F-Bryan
Michael-F-Bryan / parsing-subprocess-output.rs
Last active May 18, 2017 07:49
An quick program for parsing `git log` output and capturing each commit's hash and commit message.
#[macro_use]
extern crate error_chain;
extern crate regex;
use std::process::Command;
use regex::Regex;
error_chain!{
foreign_links {
Io(std::io::Error);
#include <stdio.h>
#include <string.h>
// Naive algorithm to "shift" a decimal number left `length` digits.
int stretch(int n, int length) {
for (int i = 0; i < length; ++i) {
n *= 10;
}
return n;
// github-backups is a program for saving a local copy of all the repositories
// you've created or starred on GitHub.
//
// It expects the "API_TOKEN" environment variable to be set to a valid oauth2
// token so you can login using the github client. For convenience, you can use
// a `dotenv` file.
package main
import (
"context"