Skip to content

Instantly share code, notes, and snippets.

View UtahDave's full-sized avatar

David Boucha UtahDave

View GitHub Profile
@lithid
lithid / Grid
Created February 20, 2013 02:05
Here is a grid using python and GTK3, loading dynamically based on window size/re-size. I came up with this example while trying to mimic a gridview of images for a wallpaper application. The example is below.
#!/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):
@dangarthwaite
dangarthwaite / elasticsearch.yml
Created December 3, 2012 22:43
salt state for elasticsearch on squeeze
# 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"]
@ssokolow
ssokolow / winenv.py
Created June 5, 2011 21:55
Helpers for permanent modifications to the Windows environment
#!/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)