Skip to content

Instantly share code, notes, and snippets.

View dekimsey's full-sized avatar

Daniel Kimsey dekimsey

View GitHub Profile
@dekimsey
dekimsey / gollum.rb
Created April 8, 2013 14:35
This code snippet assumes you are using the Rack style bootstrapping as detailed in Gollum's Readme. This code must go AFTER the require libraries and before any objects are first created.
##
# This is an example of how one might go about monkey-patching custom syntax
# into the gollum wiki engine.
##
# Monkey Patch the gollum library to support {.css-class} syntax
# Mechanics derived from http://stackoverflow.com/questions/4470108/when-monkey-patching-a-method-can-you-call-the-overridden-method-from-the-new-i
class Gollum::Markup
# Add our class variable, cssmap.
@dekimsey
dekimsey / git-ignore
Last active December 19, 2015 13:19 — forked from afontaine/git-ignore
now with saner listing as well as not requiring git directory to just list.
#!/bin/sh
USAGE="list | list-single | <types> ..."
LONG_USAGE="Generate/Append the repo's .gitignore file using the gitignore.io api
`curl -s http://gitignore.io/api/`"
SUBDIRECTORY_OK=
NONGIT_OK=1
OPTIONS_SPEC=
@dekimsey
dekimsey / failed-equals-batch-kills-playbook.yml
Last active June 20, 2016 22:05
Demonstrate Ansible not completing all Plays when failures are found
---
- name: Play 0 (all is good)
hosts: all
become: false
connection: local
gather_facts: no
tasks:
- name: Task 1 -- Runs OK
command: date
@dekimsey
dekimsey / with_items-doesnt-show-as-failed.yaml
Created July 12, 2016 18:41
with_items fails to flag module errors as failures
---
- hosts: localhost
connection: local
become: true
gather_facts: false
tasks:
- block:
- yum:
name: foobar
state: installed
@dekimsey
dekimsey / example.png
Last active July 16, 2016 23:34
Color scheme for the Default Settings in PuTTY.
example.png
@dekimsey
dekimsey / .gitignore
Last active August 12, 2016 19:31
ini_file doesn't support multiline keys
*.array
*.inline
@dekimsey
dekimsey / gist:902dc3212cbad1ea5e2b1b10c8a7eefc
Created September 12, 2016 21:05
subscription-manager-1.11.3-11.el5
[root@port-db-dv3-01 ~]# /usr/sbin/subscription-manager status
Traceback (most recent call last):
File "/usr/sbin/subscription-manager", line 58, in ?
from subscription_manager.injectioninit import init_dep_injection
File "/usr/share/rhsm/subscription_manager/injectioninit.py", line 17, in ?
from subscription_manager.cache import ProductStatusCache, EntitlementStatusCache, \
File "/usr/share/rhsm/subscription_manager/cache.py", line 33, in ?
from subscription_manager.jsonwrapper import PoolWrapper
File "/usr/share/rhsm/subscription_manager/jsonwrapper.py", line 18, in ?
from subscription_manager.utils import is_true_value
@dekimsey
dekimsey / filtering-by-group_by.yml
Last active January 17, 2017 18:13
cannot filter host_lists with group_by generated groups
# ansible-playbook -i localhost, filtering-by-group_by.yml
- name: Gather facts and partition hosts
hosts: '!__partitioned'
become: false
connection: local
tasks:
- group_by:
key: __skipme
- group_by:
# ansible-playbook -i localhost, ./demo-facts-lifetime.yml
- hosts: localhost
connection: local
tasks:
- name: Facts gathereed OK
debug:
var: ansible_date_time.epoch
- name: Sleep for a few seconds
command: sleep 2
@dekimsey
dekimsey / output.json
Last active January 3, 2019 23:18
Table OCR
{
"Lines": [
{
"Words": [
{
"WordText": "DAY",
"Left": 20,
"Top": 103,
"Height": 11,
"Width": 29