Skip to content

Instantly share code, notes, and snippets.

View rharriso's full-sized avatar

Ross Harrison rharriso

View GitHub Profile
set nocompatible " be iMproved, required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
filetype off
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
/*
server-start starts up nodemon
the output is corrected to show new lines correctly.
*/
var nodemon = require('gulp-nodemon');
var replace = require('stream-replace');
var gutil = require('gulp-util');
// Start server with nodemon
@rharriso
rharriso / .zshrc
Created February 15, 2017 15:49
osx .zshrc
source ~/.profile
export ZSH=/Users/{USER}/.oh-my-zsh
ZSH_THEME="robbyrussell"
plugins=(git)
source $ZSH/oh-my-zsh.sh
# autojump
[[ -s $(brew --prefix)/etc/profile.d/autojump.sh ]] && . $(brew --prefix)/etc/profile.d/autojump.sh
# attach and detach for node debugger
'atom-text-editor':
'F4': 'node-debugger:attach'
'shift-F4': 'node-debugger:stop'
# exec command for vim
'atom-text-editor.vim-mode-plus.normal-mode':
':': 'vim-mode-plus-ex-mode:open'
'!': 'vim-mode-plus-ex-mode:toggle-setting'
@rharriso
rharriso / yo.js
Last active March 16, 2017 00:51
alert('yo');
struct coord {
int i = 0;
int j = 0;
};
// equality comparison between two coors
inline bool operator == (const coord &lhs, const coord &rhs) {
return lhs.i == rhs.i && lhs.j == rhs.j;
}
class SudokuCell {
public:
coord pos;
set<coord> neighbors{};
int value = 0;
// set position and generate neighbors
void setPosition(coord pos);
private
----------------------------------
| | 7 | |
| | 7 | |
| | 7 | |
----------------------------------
| 7 7 7 | 6 7 7 | 7 7 7 |
| | 7 7 7 | |
| | 7 7 7 | |
----------------------------------
using cellQueue = queue<shared_ptr<SudokuCell>>;
class SudokuBoard {
cellQueue cells;
public:
// initialize board
SudokuBoard(){/* ... */}
// fill the board with valid solution
void fillCells(){/* ... */}
// adjust to deque for pushing back on front
using cellQueue = deque<shared_ptr<SudokuCell>>;
class SudokuBoard {
cellQueue cells;
public
/*
* .....
*/