Skip to content

Instantly share code, notes, and snippets.

# This gist is compatible with Ansible 1.x .
# For Ansible 2.x , please check out:
# - https://gist.github.com/dmsimard/cd706de198c85a8255f6
# - https://github.com/n0ts/ansible-human_log
# 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 3 of the License, or
# (at your option) any later version.
#
@superdaigo
superdaigo / zabbix-alert-smtp.sh
Created September 20, 2012 04:58
Zabbix SMTP Alert script for gmail
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Zabbix SMTP Alert script for gmail.
"""
import sys
import smtplib
from email.MIMEText import MIMEText
from email.Header import Header
@strarsis
strarsis / .bashrc
Created March 16, 2018 18:02
Vagrant on WSL (Bash on Windows)
# Vagrant
export VAGRANT_WSL_ENABLE_WINDOWS_ACCESS="1"
export PATH=$PATH:/mnt/c/Program\ Files/Oracle/VirtualBox
export VAGRANT_WSL_WINDOWS_ACCESS_USER_HOME_PATH="/mnt/c/Users/<Windows Username>"
@giovtorres
giovtorres / slurm_sched_stats.py
Last active April 3, 2020 08:41
Graph Slurm's sdiag with PySlurm and Graphite
#!/usr/bin/python
# vim: set ts=4 sw=4 et
"""
slurm_sched_stats.py
A script that uses PySlurm to get the slurm scheduler statistics.
"""
import pickle
import socket
@elmarcoh
elmarcoh / table_init.js
Created October 26, 2012 21:35
Using Tastypie as an Ajax Source for DataTables
$('#participantes-table').dataTable({
bProcessing: true,
bServerSIde: true,
sAjaxSource: "/path/to/your/tastypie/api/list/objects/?format=json",
sAjaxDataProp: "objects",
aoColumns: [
// Put the resource name that corresponds to each table column
{'mData': "your"},
{'mData': "columns"},
],