Skip to content

Instantly share code, notes, and snippets.

View elliotwesoff's full-sized avatar

Elliot Wesoff elliotwesoff

View GitHub Profile
def quicksort(arr, left, right):
if left < right:
partition_pos = partition(arr, left, right)
quicksort(arr, left, partition_pos - 1)
quicksort(arr, partition_pos + 1, right)
def partition(arr, left, right):
i = left
j = right - 1
pivot = arr[right]
call plug#begin()
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'preservim/nerdtree'
Plug 'preservim/nerdcommenter'
Plug 'rking/ag.vim'
Plug 'vim-syntastic/syntastic'
Plug 'puremourning/vimspector'
Plug 'vim-ruby/vim-ruby'
Plug 'rafi/awesome-vim-colorschemes'
elliotwesoff /
Created September 25, 2021 04:24
python cli template
import sys
import logging
import traceback
from optparse import OptionParser
def main():
(options, args) = setup()
return 0
def setup():
elliotwesoff / wa-hide.js
Created June 8, 2021 04:41
Hide WebAssign responses and answer keys
// copy and paste this function and call into your browser's dev tools console.
// use hideAnswers(false) to show the responses and answer keys again after initially hiding them.
function hideAnswers(hide) {
const selectors = '.static, .mq-root-block, input, div.solutionContainer, span.seenKey, img[alt*=answer], img[alt*=infinity], img[alt*="-infinity"], img[src*=symimage]';
document.getElements(selectors).forEach(e => = hide ? 'none' : 'inherit');
elliotwesoff /
Last active June 7, 2021 00:07
Naruto manga downloader
import time
import pathlib
import requests
from optparse import OptionParser
base_url = ''
consecutive_error_threshold = 5
def setup():
parser = OptionParser()
elliotwesoff / py-stop-snippet.cson
Created September 4, 2019 00:03
Python code interact in Atom, with globals and locals
'prefix': 'stop'
'body': 'import code; code.interact(local=dict(globals(), **locals()))'
elliotwesoff / elliot.bat
Created March 22, 2017 14:26
@echo off
doskey gs=git status
doskey gl=git log
doskey gd=git diff
doskey gb=git branch
doskey l=ls -lah
doskey size=du -sh
doskey e=explorer
doskey hosts=vim C:\Windows\System32\drivers\etc\hosts
elliotwesoff / messenger.html
Last active March 13, 2017 15:57
Little bb messenger window yay!
<!DOCTYPE html>
<meta charset="utf-8" />
var height = 300;
var width = 500;
elliotwesoff / setup-dev-environment
Created November 8, 2016 17:12
Script to quickly setup necessary tools for a Linux dev environment.
function process_failed {
echo "${1} didn't download correctly"
# download vimrc and add to system vimrc
# wget -O ~/.vimrc
if [ "$?" -eq 1 ]; then process_failed vimrc; else echo vimrc OK; fi
" Vim color file
" Converted from my Textmate Code School theme using Coloration
set background=dark
highlight clear
if exists("syntax_on")
syntax reset