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
man() { | |
env LESS_TERMCAP_mb=$'\E[01;31m' \ | |
LESS_TERMCAP_md=$'\E[01;38;5;74m' \ | |
LESS_TERMCAP_me=$'\E[0m' \ | |
LESS_TERMCAP_se=$'\E[0m' \ | |
LESS_TERMCAP_so=$'\E[38;5;246m' \ | |
LESS_TERMCAP_ue=$'\E[0m' \ | |
LESS_TERMCAP_us=$'\E[04;38;5;146m' \ | |
man "$@" | |
} |
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(box_syntax, box_patterns, nll)] | |
extern crate rayon; | |
use std::{ | |
borrow::{Borrow, BorrowMut}, | |
cmp::Ordering, | |
}; | |
type Stem<T> = Option<Box<Node<T>>>; |
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
template<typename Data> struct Point { | |
// Structs have all public by default, where classes are all private by default | |
Data x; | |
Data y; | |
Point(): // default constructor | |
x(0), y(0) { // member initialization, an alternative to [= in the constructor] | |
// do things | |
} | |
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
class It | |
def initialize; end | |
def method_missing(m) | |
verb = m.to_s.chomp('!').capitalize.sub('_', ', ') | |
noun = self.class.name.downcase | |
puts "#{verb} #{noun}" | |
puts if verb.include?(',') | |
self | |
end |