Skip to content

Instantly share code, notes, and snippets.

@justhalf
justhalf / vim_plugin.md
Created January 8, 2020 18:24
Description of vim plugins I used
function botPlay(runner){function checkAndDecide(){if(runner.crashed){clearInterval(window.interval);return;}if(runner.paused){return;}tRex = runner.tRex;obstacles = runner.horizon.obstacles;if(obstacles.length > 0){obstacle = obstacles[0];value = obstacle.xPos + obstacle.width - 2.5*obstacle.yPos - tRex.xPos;if(obstacle.yPos > 50 && obstacle.xPos > 30){if(value < -162 + 15 * runner.currentSpeed){tRex.startJump(runner.currentSpeed);}}} else {return;}}runner.playIntro();window.interval = setInterval(checkAndDecide, 10);}botPlay(Runner.instance_);
@justhalf
justhalf / .vimrc
Last active October 8, 2019 06:21
Vim config to get template
filetype plugin indent on
set nocompatible
set modelines=0
colorscheme ron
set tabstop=4
set shiftwidth=4
set softtabstop=4
set expandtab
set sidescroll=1
@justhalf
justhalf / dialog.bash
Created April 20, 2016 08:04
Bash Option Dialog
# An example of an option dialog
# This one comes from EC2 experiments in SMSNP project
cmd=(dialog --separate-output --no-tags --checklist "Select files to be used:" 28 120 28)
files=()
for file in $(ls -1 -a ${directory}); do
if [ "$file" == "." ] || [ "$file" == ".." ]; then
continue
fi
files+=($file)
done
@justhalf
justhalf / .bash_profile
Last active February 1, 2018 01:43
List of useful aliases
export CLICOLOR=1
export LSCOLORS=ExGxBxDxCxEgEdxbxgxcxd
export PS1='[\t]\H \[\033[38;5;14m\]\W\[\e[0m\]\\$ '