Skip to content

Instantly share code, notes, and snippets.

@Inityx
Inityx / .bash_aliases
Created March 13, 2019 03:32
man highlighting
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 "$@"
}
#![feature(box_syntax, box_patterns, nll)]
extern crate rayon;
use std::{
borrow::{Borrow, BorrowMut},
cmp::Ordering,
};
type Stem<T> = Option<Box<Node<T>>>;
@Inityx
Inityx / points.cpp
Last active January 30, 2017 23:58
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
}
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