Skip to content

Instantly share code, notes, and snippets.

View joejulian's full-sized avatar
🕶️
working without pants.

Joe Julian joejulian

🕶️
working without pants.
View GitHub Profile
---
deployment:
cluster:
- name: joej
network: 10.32.0.0/12
dns: 10.32.0.2
domain: cluster.local
provider: ['aws']
repos:
- name: atlas
@joejulian
joejulian / windows_join_domain
Last active January 28, 2016 23:15
windows_join_domain
winrepo:
module.run:
- name: pkg.refresh_db
install_win32net:
pkg.installed:
- name: win32net
- refresh_db: True
- require:
- pkg: winrepo
class Meta:
queryset = Item.objects.prefetch_related('components').all()
#...
def dehydrate_quantity(self, bundle):
if len(bundle.data['components']):
qty = min([ int(x.component.quantity/x.quantity) for x in bundle.obj.components.all() ] )
bundle.data['quantity'] = qty
return bundle.data['quantity']
input {
file {
path => "/var/log/glusterfs/*.log"
sincedb_path => "/var/tmp/.glusterfs.sincedb"
format => "plain"
type => "glusterfs"
}
file {
path => "/var/log/glusterfs/bricks/*.log"
sincedb_path => "/var/tmp/.glusterfs.bricks.sincedb"
@joejulian
joejulian / set_gnome-terminal_transparency.sh
Last active March 25, 2021 15:01 — forked from nirbheek/set_gnome-terminal_transparency.sh
A tiny script to set the transparency of the current X window. If "all" is specified, it tries to find all gnome-terminal windows and applies the transparency to all of them.
#!/bin/bash
# vim: set sts=4 sw=4 et tw=0 :
#
# License: BSD
: ${XWININFO:=$(type -P xwininfo)}
[[ -z ${XWININFO} ]] && { echo "You need to install xwininfo"; exit 1; }
: ${XPROP:=$(type -P xprop)}
[[ -z ${XPROP} ]] && { echo "You need to install xprop"; exit 1; }