This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Helpers for automating the process of setting up ported Linux/UNIX | |
applications which were designed with expectations like being in $PATH. | |
@note: Basic functionality requires only the Python standard library. | |
Some functions and methods also require the PyWin32 package. | |
@note: A much more verbose "sudo for Windows" implementation (BSD-licensed) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vim: ft=yaml | |
cluster.name: {{ ES_CLUSTER_NAME }} | |
node.name: {{ grains['id'] }} | |
network.host: {{ salt['cmd.run']('awk \'/192.168/ {print $2}\' /etc/network/interfaces') }} | |
discovery.zen.ping.multicast.enabled: false | |
discovery.zen.ping.unicast.hosts: ["192.168.1.2", "192.168.1.3"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2 | |
from gi.repository import Gtk | |
class Grid(Gtk.Window): | |
widget_list = [] | |
WIDGET_SIZE = 140 | |
COLS = 1 | |
NUM = 100 | |
def calcule_columns(self, scroll, grid): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MySQL. Versions 4.1 and 5.0 are recommended. | |
# | |
# Install the MYSQL driver | |
# gem install mysql2 | |
# | |
# Ensure the MySQL gem is defined in your Gemfile | |
# gem 'mysql2' | |
# | |
# And be sure to use new-style password hashing: | |
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This enables us to call the minions and search for a specific role | |
""" | |
import logging | |
# Import salt libs | |
import salt.utils | |
import salt.payload |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
trap '[ -f patch.$$ ] && patch -R < patch.$$' 0 | |
PATH="$PATH:`pwd`/patchelf/src" | |
set -e | |
#exec >/dev/null | |
[ -f setup.py ] || { printf "You seem to be in the wrong directory.\n"} >&2; exit 1; } | |
if ! which patchelf >/dev/null 2>&1; then | |
printf "Couldn't find 'patchelf', going to download and compile.\n" >&2 | |
git clone https://github.com/NixOS/patchelf | |
( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
salt-minion: | |
pkg: | |
- installed | |
service: | |
- running | |
- require: | |
- pkg: salt-minion | |
- watch: | |
- file: /etc/salt/minion.d/grains.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# localhost_present_host:} | |
# host.present: | |
# - ip: 127.0.0.1 | |
# - name: {{ grains['id'] }} #} | |
local_address_host: | |
host.absent: | |
- ip: 127.0.1.1 | |
{% if grains['ec2_local-ipv4'] is defined -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Functions to more easily work with a ton of organization repos | |
# | |
# Requires ok.sh and Git. | |
# | |
# Available commands: ${ALL_FUNCS} | |
# Lazyness! | |
ok="$(which ok.sh)" | |
eval "$(awk '$0 ~ /^_helptext/, /^}/ { print }' $ok)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) 2013, Andrea Grandi and individual contributors. | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without modification, | |
# are permitted provided that the following conditions are met: | |
# | |
# 1) Redistributions of source code must retain the above copyright notice, | |
# this list of conditions and the following disclaimer. | |
# | |
# 2) Redistributions in binary form must reproduce the above copyright notice, |
OlderNewer