Skip to content

Instantly share code, notes, and snippets.

@audreyfeldroy
audreyfeldroy / pypi-release-checklist.md
Last active February 23, 2023 15:03
My PyPI Release Checklist
  • Update HISTORY.md
  • Commit the changes:
git add HISTORY.md
git commit -m "Changelog for upcoming release 0.1.1."
  • Update version number (can also be minor or major)
bumpversion patch
@maxim
maxim / task.yml
Created June 12, 2014 11:09
Adding github to known_hosts with ansible
- name: ensure github.com is a known host
lineinfile:
dest: /root/.ssh/known_hosts
create: yes
state: present
line: "{{ lookup('pipe', 'ssh-keyscan -t rsa github.com') }}"
regexp: "^github\\.com"
@maxivak
maxivak / 00.md
Last active May 1, 2021 13:54
Teamcity install on Centos

Teamcity install on Centos

@leifdenby
leifdenby / migration_loaddata.py
Last active December 9, 2020 19:28
Django function for loading fixtures which use the current migration state of the model
from django.core import serializers
import os
def loaddata(fixture_name, apps, ignorenonexistent=True):
"""
Loads migrations that work at current state of a model, in constrast to
`loaddata` which requires a fixture to have data matching the fields
defined in `models.py`.
@rtzll
rtzll / app.py
Last active February 16, 2023 22:27
Using the app context in a flask blueprint
from flask import Flask
from blueprint import sample
app = Flask(__name__)
app.register_blueprint(sample)
app.config['SOMETHING'] = 'something'
if __name__ == '__main__':
app.run()