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
#![feature(slice_patterns)] | |
use itertools::Itertools; | |
use std::collections::HashMap; | |
#[derive(Debug, PartialEq, Eq, Hash)] | |
enum Kind { Zero, Five, Other } | |
fn main() { |
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 futures; // 0.1.26 | |
extern crate tokio; // 0.1.18 | |
use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering}; | |
use std::sync::Arc; | |
use std::thread::{sleep, spawn}; | |
use std::time::Duration; | |
use futures::prelude::*; | |
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 serde; | |
extern crate serde_json; | |
use serde::{Serialize, Deserialize}; | |
use chrono::{Utc, DateTime}; // 0.4.6 | |
#[derive(Serialize, Deserialize, Debug)] | |
struct Point { | |
x: i32, |
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
#[macro_use] | |
extern crate serde_derive; | |
extern crate chrono; | |
extern crate serde; | |
extern crate serde_json; | |
use chrono::{DateTime, Utc}; | |
#[derive(Serialize, Deserialize, Debug)] |
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
(defun conv (v) | |
(let ( | |
(base #x80) (ac v) (q) (r)) | |
(while (> ac 0) | |
(setq q (/ ac base)) | |
(setq r (% ac base)) | |
(if (> q 0) (setq r (+ r base))) | |
(print (format "%x" r)) | |
(setq ac q)))) |
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
# delete the dotnet folder under /usr/local/share/dotnet | |
1. cd /usr/local/share/dotnet && ls | |
2. sudo rm -rf dotnet | |
# delete the dotnet reference file at /etc/paths.d/dotnet | |
1. cd /etc/paths.d && ls | |
2. sudo rm dotnet |