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
-- Modified by Felipe Reyes <freyes@tty.cl> | |
-- Original: http://awesome.naquadah.org/wiki/Acpitools-based_battery_widget | |
-- usage: | |
-- require("battery") | |
-- include "mybattmon" in your wibox | |
local naughty = require("naughty") | |
local time_rem = "" | |
mybattmon = widget({ type = "textbox", name = "mybattmon", align = "right" }) |
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
;; to debug the .emacs file | |
(setq debug-on-error nil) | |
(setq visible-bell nil) | |
;; setup the default mode to use | |
;;Text mode is happier than Fundamental mode ;-) | |
(setq default-major-mode 'text-mode) | |
;; define the mail and name | |
(setq user-mail-address "foo@example.com") |
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
urxvt.foreground: grey90 | |
urxvt.cursorColor: #729fcf | |
urxvt.font: -xos4-terminus-medium-r-normal--14-140-72-72-c-80-iso8859-15 | |
urxvt.scrollBar: False | |
urxvt.shading: 50 | |
urxvt.transparent: True | |
urxvt.fade: 80 | |
urxvt.fadeColor: #e9b96e | |
urxvt.tintColor: #5c5c5c | |
urxvt*urgentOnBell: true |
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
# check a RDS with nagios and change the check host command (by default ping) | |
# to check an open tcp port | |
define command { | |
command_name check-rds-host-alive | |
command_line /usr/lib/nagios/plugins/check_tcp -H $HOSTADDRESS$ -p 3306 | |
} | |
define host { | |
use generic-host |
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
import zmq | |
import urlparse | |
import urllib | |
import json | |
DEFAULT_TIMEOUT=5 | |
def parse(link): | |
url_data = urlparse.urlparse(link) | |
query = urlparse.parse_qs(url_data.query) |
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
import zmq | |
import sys | |
context = zmq.Context() | |
socket = context.socket(zmq.PUSH) | |
socket.connect("tcp://172.21.0.49:5000") | |
socket.send_json({'video': sys.argv[1]}) | |
sys.exit(0) |
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
# one line to give the program's name and an idea of what it does. | |
# Copyright (C) 2013 Felipe Reyes <freyes@tty.cl> | |
# | |
# This program is free software; you can redistribute it and/or | |
# modify it under the terms of the GNU General Public License | |
# as published by the Free Software Foundation; either version 2 | |
# of the License, or (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
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
import os | |
import tempfile | |
import shutil | |
from contextlib import contextmanager | |
@contextmanager | |
def mkdtemp(*args, **kwargs): | |
d = tempfile.mkdtemp(*args, **kwargs) | |
try: |
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 | |
# Jorge Niedbalski <jnr@pyrosome.org> | |
class Query: | |
def __init__(self): | |
(self.c, self.d) = ([],[]) | |
def a(self, d): | |
self.d.append(d) |
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 | |
# | |
# Usage: | |
# ./os-nova-pause.sh pause | |
# | |
# Note: remember to define the environment variables used by the openstack clients | |
# typically this is done sourcing a 'openrc' file (you can download it from horizon) | |
# | |
function mod_server { |
OlderNewer