Skip to content

Instantly share code, notes, and snippets.

View SEJeff's full-sized avatar

Jeff Schroeder SEJeff

View GitHub Profile
[MASTER]
profile=no
persistent=yes
ignore=migrations
cache-size=500
[BASIC]
# Regular expression which should only match correct module names
module-rgx=([a-z][a-z0-9_]*)$
@SEJeff
SEJeff / BROKEN.png
Last active December 27, 2015 11:49
Phabricator broke my meme!
BROKEN.png
@SEJeff
SEJeff / gist:7310830
Last active January 16, 2020 09:07
Apache config to load balance across a cluster of elasticsearch instances on 2 different servers, "es-cluster-1", and "es-cluster-2".
<VirtualHost *:80>
ServerName balancer.local
Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/" env=BALANCER_ROUTE_CHANGED
<Location /balancer-manager>
ProxyPass !
SetHandler balancer-manager
#Require host example.com
Require host localhost
</Location>
@SEJeff
SEJeff / README.md
Last active August 31, 2021 14:55
Python learnings
  1. Learn Python the Hard Way - Great introductory course to python and programming
  2. The Python Guide - After you have a cursory idea of python, this is great
  3. Code Like a Pythonista: Idiomatic Python - For learning the "pythonic" way of doing things
  4. Tango with Django - Great intro to building python web applications
  5. Intro to Flask, TDD, and jQuery
  6. Selenium's Page Object Pattern for testing websites
  7. The Python Yield Keyword Explained - Good precursor to the generator tricks
  8. Incredible guide on Python's __ (underscore) methods - Must read for anyo
Choose a ticket class: <select id="tickets"></select>
<p id="ticketOutput"></p>
<script id="ticketTemplate" type="text/x-jquery-tmpl">
{{if chosenTicket}}
You have chosen <b>${ chosenTicket().name }</b>
($${ chosenTicket().price })
<button data-bind="click: resetTicket">Clear</button>
{{/if}}
#!/usr/bin/env python
'''
Drop a user into a Python shell preconfigured with a Salt environment
'''
import atexit
import atexit
import os
import pprint
import readline
import rlcompleter