Skip to content

Instantly share code, notes, and snippets.

View grantmcconnaughey's full-sized avatar

Grant McConnaughey grantmcconnaughey

View GitHub Profile
@login_required
def dashboard(request, service):
projects = request.user.get_projects(service)
return render(request, 'project/dashboard.html', {'projects': projects})
def __init__(self):
self.linter = self.get_linter()
def lint_entire_project(self):
"""Lints the local repo and returns the violations found."""
self.state = BUILD_RUNNING
self.save()
violations = self.linter.lint()
def lint_entire_project(self, local_repo_path):
"""Runs quality checks on the local repo and returns the output as a string."""
self.state = BUILD_RUNNING
self.save()
process = subprocess.Popen(['flake8', local_repo_path],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
shell=False)
@grantmcconnaughey
grantmcconnaughey / gitconfig
Last active March 14, 2016 15:03
My .gitconfig
[user]
name = Grant McConnaughey
email = grantmcconnaughey@gmail.com
[color]
ui = true
[core]
excludesfile = ~/.gitignore_global
autocrlf = input
[alias]
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
syntax on
filetype indent on
set number
set autoindent
set tabstop=4
set expandtab
set shiftwidth=4
highlight LineNr ctermfg=grey