Skip to content

Instantly share code, notes, and snippets.

View SEJeff's full-sized avatar

Jeff Schroeder SEJeff

View GitHub Profile
@SEJeff
SEJeff / git-add-commit-msg-prefix.md
Created November 30, 2022 19:45
Git: Add prefix to a range of commit messages

Original Link

Imagine that you cloned an open source project to contribute something. You implemented a bugfix through a series of atomic commits on a private branch. Just when you’re about to create a Pull Request to submit your changes, you discover in the contributor’s guide that you’re supposed to prefix each commit with the bug tracking number.

Rewriting the commit message of the last commit is easy:

git commit --amend

The mustache gotcha

When using “bound” objects in an .aurora file it is an absolute that you do not have spaces in the “mustaches”.

Examples:

  • Bad: {{ profile.my_var }}
  • Good: {{profile.my_var}}

Mesos Slave Constraints

When scheduling a task on aurora with Production=True, the 0.7-incubating scheduler will set a default constraint preventing more than one instance of the task on the same rack.

[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_]*)$
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
def normalize_line(line):
return [piece.strip() for piece in line.split("|")[1:-1]]
def is_valid_line(line):
return "|" in line
def load(text):
lines = map(normalize_line,
filter(is_valid_line,
text.strip().splitlines()))
import os
import os.path
import sys
from graphite.render.hashing import ConsistentHashRing
instances = []
unwelcome_instances = []
for arg in sys.argv[1:]:
unwelcome = False
import salt.utils.event
event = salt.utils.event.MasterEvent('/var/run/salt/master')
while True:
data = event.get_event()
print(data)
"""
This enables us to call the minions and search for a specific role
"""
import logging
# Import salt libs
import salt.utils
import salt.payload