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 | |
""" | |
graph.py A small tool that allows you to generate a visual representation of your devices and links using discovery | |
protocols from the links table of Observium | |
Author: Mathieu Poussin <mathieu.poussin@oxalide.com> | |
Date: 01/2015 | |
Usage: This program accepts many arguments : | |
--debug : Debug mode, write one image per step |
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
<?php | |
/** | |
* Observium | |
* | |
* This file is part of Observium. | |
* | |
* @package observium | |
* @subpackage discovery | |
* @author Adam Armstrong <adama@memetic.org> |
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
<?php | |
function secondsToTime($seconds) { | |
$dtF = new DateTime("@0"); | |
$dtT = new DateTime("@$seconds"); | |
return $dtF->diff($dtT)->format('%a days, %h hours, %i minutes and %s seconds'); | |
} | |
// HIGHEST UPTIMES |
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
xml2json = require "xml2json" | |
fs = require "fs" | |
util = require "util" | |
request = require "request" | |
#sleep = require "sleep" | |
tumblr_name = process.argv[2] | |
api_endpoint = util.format "http://%s.tumblr.com/api/read", tumblr_name | |
start = 0 | |
num = 50 |
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/perl -w | |
use v5.14; | |
use Curses::UI; | |
my $cui = new Curses::UI( -color_support => 1, -clear_on_exit => 1); | |
for my $second (reverse(1..2)) { | |
$cui->status("Attaching to TMUX in $second second(s)\n Press CTRL-C to avoid TMUX"); | |
sleep 1; | |
} |
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 humanfriendly | |
def disk(pl, monitor="/", threshold_gig=10): | |
partition = os.statvfs(monitor) | |
available = partition.f_bsize * partition.f_bavail | |
available_gig = available / 1024 ** 2 | |
threshold_crit_gig = threshold_gig*0.5 | |
ret = [] |
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
package main | |
import ( | |
"crypto/sha256" | |
"encoding/hex" | |
"io/ioutil" | |
"os" | |
"sync" | |
"github.com/fatih/color" |
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
# Standard packages | |
{% for package in pillar["ci"]["packages"]["standards"] %} | |
Package {{ package }} should have the revision {{ pillar["ci"]["revision"] }} active for the {{ pillar['application_environment'] }} environment: | |
svn.latest: | |
- name: http://xxxx/{{ pillar['application_environment'] }}/{{ package }}/trunk | |
- target: C:\inetpub\wwwroot\{{ pillar['application_environment'] }}\{{ package }} | |
- rev: {{ pillar["ci"]["revision"] }} | |
- username: {{ pillar["ci"]["svn"]["username"] }} | |
- password: {{ pillar["ci"]["svn"]["password"] }} |
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
The error: | |
salt "bcn6-web-staging-1" state.apply windows.services.iis.sites | |
bcn6-web-staging-1: | |
Data failed to compile: | |
---------- | |
Rendering SLS 'base:windows.services.iis.sites' failed: while parsing a block mapping | |
in "<unicode string>", line 3, column 1: | |
Create xxxstaging.com site: | |
^ |
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
---------- | |
ID: Python should be installed | |
Function: pkg.installed | |
Name: xxx-python3 | |
Result: False | |
Comment: The following packages failed to install/update: xxx-python3=3.6.1 | |
Started: 16:26:20.519000 | |
Duration: 82535.0 ms | |
Changes: | |
---------- |
OlderNewer