Skip to content

Instantly share code, notes, and snippets.

Jeff Schroeder SEJeff

Block or report user

Report or block SEJeff

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@SEJeff
SEJeff / init.sls
Last active Aug 29, 2015
States for reproducing salt bug #14497. They are all under services/httpd/ in the states tree
View init.sls
{% from "services/httpd/map.jinja" import httpd with context %}
{% set ltsv_conf = httpd.modconfdir + "/00-ltsv-log-format.conf" %}
httpd:
pkg:
- installed
- name: {{ httpd.pkg }}
service:
- running
- name: {{ httpd.service }}
View .pylintrc
[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 Dec 27, 2015
Phabricator broke my meme!
@SEJeff
SEJeff / gist:7310830
Last active Jan 16, 2020
Apache config to load balance across a cluster of elasticsearch instances on 2 different servers, "es-cluster-1", and "es-cluster-2".
View gist:7310830
<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 Mar 21, 2019
Python learnings
View README.md
  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
View example.html
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}}
You can’t perform that action at this time.