Skip to content

Instantly share code, notes, and snippets.

View mgedmin's full-sized avatar

Marius Gedminas mgedmin

View GitHub Profile
10 Easy Alternatives To Common Ableist Language
Say This! | Not That!
-------------------------
unreal | insane
unbelievable | crazy
jerk | psycho
awful | stupid
bad | dumb
moody | bipolar
@mgedmin
mgedmin / gist:b006cb503d1a0f3aefc0
Created January 13, 2016 07:03
mvn test failure
mg@platonas: ~/src/embeddable-build-status-plugin [git:master $=] $ mvn test
[INFO] Scanning for projects...
[WARNING] The POM for org.jenkins-ci.tools:maven-hpi-plugin:jar:1.106 is missing, no dependency information available
[WARNING] Failed to build parent project for org.jenkins-ci.plugins:embeddable-build-status:hpi:1.9-SNAPSHOT
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building embeddable-build-status 1.9-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-hpi-plugin:1.106:validate (default-validate) @ embeddable-build-status ---
diff --git a/Lib/unittest/signals.py b/Lib/unittest/signals.py
index e6a5fc5..1ba8b43 100644
--- a/Lib/unittest/signals.py
+++ b/Lib/unittest/signals.py
@@ -6,6 +6,10 @@ from functools import wraps
__unittest = True
+def _do_nothing_handler(unused_signum, unused_frame):
+ pass
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mgedmin
mgedmin / action-plugin.py
Last active November 24, 2015 06:20
"changelog" module for Ansible, wrapping new-changelog-entry from pov-admin-tools
# action_plugins/changelog.py
import time
try:
# Ansible 2
from ansible.plugins.action import ActionBase
class ActionModule(ActionBase):
'''Set default value for 'append' from the 'changelog_started' fact'''
@mgedmin
mgedmin / ansible.cfg
Created October 27, 2015 13:05
ansible.cfg for use with vagrant
# ansible config file for use with Vagrant
[defaults]
inventory = .vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory
remote_user = vagrant
private_key_file = ~/.vagrant.d/insecure_private_key
host_key_checking = false
# NB: host_key_checking prevents connection errors from changed host keys,
# but mismatched host keys disable ForwardAgent and make some git clones hang
---
- hosts: all
sudo: true
vars_files:
- vars.yml
vars:
body:
name: "{{host_variable}}"
tasks:
- uri:
@mgedmin
mgedmin / action_plugin.py
Last active November 18, 2020 16:50
Ansible module for manipulating .ini files
# put this in action_plugins/ini_file_ex.py if you want --diff to work
try:
# Ansible 2: no special hacks necessary
from ansible.plugins.action.normal import ActionModule
except ImportError:
# Ansible 1: hoist 'diff' from result.result
from ansible.runner.action_plugins.normal import ActionModule as _ActionModule
class ActionModule(_ActionModule):
'''Support --diff mode'''
#!/usr/bin/python
import datetime
import pprint
import hashlib
from wsgiref.simple_server import make_server
def app(environ, start_response):
pprint.pprint(environ)
now = str(datetime.datetime.now())