This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::env; | |
use std::error::Error; | |
use std::fs; | |
pub struct Config { | |
pub query: String, | |
pub filename: String, | |
pub case_sensitive: bool, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern crate chrono; | |
extern crate regex; | |
use chrono::{NaiveDate, NaiveDateTime}; | |
use regex::Regex; | |
use std::io::{self, BufRead}; | |
struct Item { | |
date: NaiveDate, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// get `IDLE` handle | |
match session.idle() { | |
Err(error) => { | |
println!("Failed to send command: IDLE"); | |
println!("IMAP server may not support IDLE command."); | |
println!("Error: {}", error); | |
std::process::exit(126); | |
} | |
Ok(idle) => { | |
println!("Waiting for Ctrl-C..."); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PS C:\Users\Ethan\Projects\actionmailbox-imap> cargo build | |
Compiling signal-hook v0.1.10 | |
error[E0433]: failed to resolve: could not find `unix` in `os` | |
--> C:\Users\Ethan\.cargo\registry\src\github.com-1ecc6299db9ec823\signal-hook-0.1.10\src\iterator.rs:55:14 | |
| | |
55 | use std::os::unix::io::AsRawFd; | |
| ^^^^ could not find `unix` in `os` | |
error[E0433]: failed to resolve: could not find `unix` in `os` | |
--> C:\Users\Ethan\.cargo\registry\src\github.com-1ecc6299db9ec823\signal-hook-0.1.10\src\iterator.rs:56:14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern crate config; | |
extern crate ctrlc; | |
extern crate native_tls; | |
extern crate serde; | |
extern crate threadpool; | |
mod configuration; | |
mod imap_client; | |
use std::sync::mpsc::channel; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Compiling actionmailbox-imap v0.1.0 (/home/ethan/projects/actionmailbox-imap-client) | |
error[E0597]: `messages` does not live long enough | |
--> src/main.rs:153:33 | |
| | |
153 | let message = match messages.iter().next() { | |
| ^^^^^^^^------- | |
| | | |
| borrowed value does not live long enough | |
| argument requires that `messages` is borrowed for `'static` | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am eknowlton on github. | |
* I am iamepk (https://keybase.io/iamepk) on keybase. | |
* I have a public key ASBLjKBt-DSxIGYIF9DxxOmdL5yenLraz8ps6-JlHzPtOgo | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set exrc | |
set encoding=UTF-8 | |
colorscheme brogrammer | |
set number | |
set relativenumber | |
set cursorline | |
set undofile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
docker run --rm --interactive --tty \ | |
--volume $PWD:/app \ | |
--volume ${COMPOSER_HOME:-$HOME/.composer}:/tmp composer composer create-project --prefer-dist laravel/laravel app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
// Future versions of Hyper may add additional config options, | |
// which will not automatically be merged into this file. | |
// See https://hyper.is#cfg for all currently supported options. | |
module.exports = { | |
config: { | |
// choose either `'stable'` for receiving highly polished, | |
// or `'canary'` for less polished but more frequent updates | |
updateChannel: "stable", | |
// default font size in pixels for all tabs |