Skip to content

Instantly share code, notes, and snippets.

color desert
set shell=/bin/bash
set encoding=utf-8
set fileencoding=utf-8
set fileencodings=utf-8,cp936
set nocompatible
set runtimepath=~/.vim,$VIM/vimfiles,$VIMRUNTIME
syntax on
set backspace=2
class BIT {
private:
vector<int> bit;
public:
int sz;
BIT(int _sz) {
sz = _sz;
bit.resize(sz + 1, 0);
}
@morriship
morriship / gist:6611f41816fd86cdf12a67036f4e66d1
Created March 27, 2019 17:03
9 x 9 multiplication table in Brainfxxk
+++[->+++<]>
[-<+++[->>+++<<]>>>+<
[->>+
convert to decimal and print the first digit
>++++++++[-<++++++<++++++>>]<<.>>
print ' '
>++++++++[-<++++>]<.
print '*'
>++[-<+++++>]<.
# TMUX Terminal Multiplexr Config..
# Make Alt-a the default Command key
set -g prefix M-a
set -g prefix2 C-b
# This means Alt-a Alt-a switches to next window
bind-key M-a last-window
bind-key C-b last-window
#!/usr/bin/python2.7
class Foo(object):
def __init__(self, value):
self.value = value
def get(self):
return self.value
"3.8.3 (created: 2014/11/09 13:19:01)
cmap <C-f> <Tab>
nmap n :tabNext<Return>
nmap m :tabnext<Return>
nnoremap j 5j
nnoremap k 5k
nnoremap J 20j
nnoremap K 20k
nnoremap O t
@morriship
morriship / tmux.conf
Created July 13, 2015 01:18
tmux config
# TMUX Terminal Multiplexr Config..
# Make Alt-a the default Command key
set -g prefix M-a
# This means Alt-a Alt-a switches to next window
bind-key M-a last-window
# Start numbering at 1
set -g base-index 1
@morriship
morriship / sieve.cpp
Last active August 29, 2015 14:18
sieve perf
/* CPU: E3-1230v2, Opt: -O2
6n+-1 sieve
Test range: 10^3, time cost: 0.000008s
Test range: 10^4, time cost: 0.000168s
Test range: 10^5, time cost: 0.002178s
Test range: 10^6, time cost: 0.040597s
Test range: 10^7, time cost: 0.815433s
Test range: 10^8, time cost: 17.922533s
Sieve of Eratosthenes