Skip to content

Instantly share code, notes, and snippets.

View Jackevansevo's full-sized avatar

Jack Evans Jackevansevo

View GitHub Profile
local lspconfig = require('lspconfig')
lspconfig.pylsp.setup{
settings = {
pylsp = {
configurationSources = {"flake8"},
plugins = {
pycodestyle = {
enabled = false
},
mccabe = {
#!/usr/bin/env python
from itertools import chain
from pathlib import Path
import shlex
import subprocess
from threading import Thread
import time
IGNORE_DIRS = ['services/graphql_api_service', 'lib/mae']
@Jackevansevo
Jackevansevo / .vimrc
Created August 8, 2018 09:19 — forked from veggiefrog/.vimrc
VIM: Remember last position in file
" Remember position of last edit and return on reopen
if has("autocmd")
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif
import json
import sys
from argparse import ArgumentParser
import dbus
session_bus = dbus.SessionBus()
bus_data = ("org.mpris.MediaPlayer2.spotify", "/org/mpris/MediaPlayer2")
spotify_bus = session_bus.get_object(*bus_data)
interface = dbus.Interface(spotify_bus, "org.freedesktop.DBus.Properties")
@Jackevansevo
Jackevansevo / gist:0ba4aabbfad4e9adc9be6533e2f8f8ad
Created June 7, 2017 09:45
Remove all git branches except master
git branch | grep -v "master" | xargs git branch -D

Keybase proof

I hereby claim:

  • I am jackevansevo on github.
  • I am jackevans (https://keybase.io/jackevans) on keybase.
  • I have a public key ASDezfmwlNQU4WQ6N6ZdksQ_WRQePjHjwiccO7bxshEoKgo

To claim this, I am signing this object:

@Jackevansevo
Jackevansevo / .csscomb.json
Created September 20, 2016 13:21
My css style guide settings, `npm install csscomb -g`
{
"remove-empty-rulesets": true,
"always-semicolon": true,
"color-case": "lower",
"block-indent": " ",
"color-shorthand": false,
"element-case": "lower",
"eof-newline": false,
"leading-zero": false,
"quotes": "single",
grep --exclude-dir="venv" -rnw -e "errors.js"
from django.contrib.auth.models import AbstractUser
from django.db import models
from django.utils.translation import ugettext_lazy as _
class KarmaUser(AbstractUser):
karma = models.PositiveIntegerField(verbose_name=_("karma"), default=0, blank=True)
# Inside project/settings.py
AUTH_USER_MODEL = "profiles.KarmaUser"
from django.conf import settings
from django.db import models
class Thing(models.Model):
owner = models.OneToOneField(settings.AUTH_USER_MODEL)
title = models.CharField(max_length=255)