Skip to content

Instantly share code, notes, and snippets.

@cecil
cecil / twopass.py
Created May 7, 2016 07:58
Python script to generate a hash for /etc/shadow (SHA512) and LDAP (SSHA1)
#!/usr/bin/python
#
# Python script to generate a hash for /etc/shadow (SHA512) and LDAP (SSHA1)
# In case you needed to support a hypothetical environment that had both auth mechanisms in play.
#
import hashlib
from base64 import urlsafe_b64encode as encode
from base64 import urlsafe_b64decode as decode
from getpass import getpass
@cecil
cecil / README.md
Created March 24, 2016 23:30
chrome font rendering ugliness
@cecil
cecil / error output
Created March 5, 2016 00:22
ansible problem - 'unicode object' has no attribute 'src'
TASK: [copy CA to local host] *************************************************
fatal: [1.2.3.4] => One or more undefined variables: 'unicode object' has no attribute 'src'
fatal: [1.2.3.5] => One or more undefined variables: 'unicode object' has no attribute 'src'
fatal: [1.2.3.6] => One or more undefined variables: 'unicode object' has no attribute 'src'
FATAL: all hosts have already failed -- aborting
@cecil
cecil / bacula-dir.conf
Last active February 23, 2016 22:01
example bacula conf for one sd with multiple autochangers
# Definition of file storage device
Storage {
Name = Library-00
Address = host.cluster.local
SDPort = 9103
Password = "whargarbl"
Device = Autoloader-00
Media Type = LTO-6
}
@cecil
cecil / ipmiyuck-configure.yaml
Last active October 19, 2017 02:26
ansible playbook - ipmi dnsmasq /etc/ethers generator and ipmitool configurator
---
# set up ipmi password and dhcp configuration, use in conjuction with ipmiyuck-pullinfo.yaml
# Display/configure lan settings
# ipmitool lan set 1 ipsrc dhcp
# ipmitool lan print 1
#
- hosts: all:!hou-dc-head
vars_prompt:
- name: "ipmi_pass"
@cecil
cecil / new_gist_file_0
Created May 20, 2015 14:33
vim regexp to replace an non-formatted list consisting of one item per line with a markdown formatted list of each item linked to google/youtube/bing/ddg search results for that item
%s/\(^.*\)/* [\1]\(https:\/\/www.google.com\/search\?q=\1\)/g
%s/\(^.*\)/* [\1]\(https:\/\/www.google.com\/search\?tbm=isch\&q=\1\)/g
%s/\(^.*\)/* [\1]\(https:\/\/www.youtube.com\/results\?search_query=\1\)/g
%s/\(^.*\)/* [\1]\(https:\/\/www.bing.com\/search\?q=\1\)/g
%s/\(^.*\)/* [\1]\(https:\/\/www.bing.com\/images\/search\?q=\1\)/g
%s/\(^.*\)/* [\1]\(https:\/\/www.bing.com\/videos\/search\?q=\1\)/g
%s/\(^.*\)/* [\1]\(https:\/\/www.duckduckgo.com\/\?q=\1\)/g
%s/\(^.*\)/* [\1]\(https:\/\/www.duckduckgo.com\/\?ia=images\&q=\1\)/g
%s/\(^.*\)/* [\1]\(https:\/\/www.duckduckgo.com\/\?ia=videos\&q=\1\)/g
@cecil
cecil / 0_reuse_code.js
Last active August 29, 2015 14:21
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@cecil
cecil / CMS_CMDB.md
Last active April 14, 2024 13:20
ITIL templates

Configuration Management System (CMS)/ Configuration Management Database (CMDB)

The Configuration Management System (CMS) is a set of tools and data that is used for collecting, storing, managing, updating, analyzing and presenting data about all configuration items and their relationships. A CMS may manage more than one physical Configuration Management Databases (CMDB). Its underlying structure is defined by the Configuration Model, a logical model of the IT organization’s service assets. The CMS is used to store information on all Configuration Items (CIs) under the control of Configuration Management. CIs can be of various types: the CMS almost always covers services and IT infrastructure, but might also cover other item types like policies, project documentation, employees, suppliers, etc.

Configuration Model and CI Types

@cecil
cecil / gist:a2af982e80a58f2bdb92
Last active August 29, 2015 14:17
NAKED HEDGEHOG
Shadow There's a saying in the orient: "Loyalty to the End"...
Do you know what it means?
Sonic Being... Patriotic?
Shadow It means devoting yourself to your country. As long
as we have "Loyalty to the End" there's no point in
believing in anything... Even in those we love.
Sonic And that's the way a Hedgehog's supposed to think?
@cecil
cecil / gist:6df662b7947ef062918c
Created January 30, 2015 17:29
collectl documentation --help -x --showoptions --showsubsys --showsubopts
[root@tl-oss-00 /]# collectl --help
This is a subset of the most common switches and even the descriptions are
abbreviated. To see all type 'collectl -x', to get started just type 'collectl'
usage: collectl [switches]
-c, --count count collect this number of samples and exit
-f, --filename file name of directory/file to write to
-i, --interval int collection interval in seconds [default=1]
-o, --options options misc formatting options, --showoptions for all
d|D - include date in output