This file contains hidden or 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 ruby | |
# encoding: utf-8 | |
require 'pathname' | |
['shorewall', 'shorewall6'].each do |shorewall_version| | |
if %x{whereis #{shorewall_version}}.split[1].nil? | |
puts "#{shorewall_version} not installed." | |
else | |
commands = {} |
This file contains hidden or 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/sh | |
# Running security updates on debian based systems managed with libvirt and | |
# accessible via ssh. | |
# Tmux, virsh and ssh are needed for this script. | |
vms=`virsh list --name` | |
if [ -z "$TMUX" ]; then |
This file contains hidden or 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
bindsym $mod+Shift+S exec /usr/local/bin/screenshot |
This file contains hidden or 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 ruby | |
# encoding: utf-8 | |
require 'json' | |
batctl = `sudo batctl vd json -n` | |
access_points, clients = [], [] | |
batctl.each_line do |line| |
This file contains hidden or 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
@weekly /usr/local/bin/ruby ~/dyndns_login.rb |
This file contains hidden or 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 ruby | |
# encoding: utf-8 | |
require 'open-uri' | |
require 'nokogiri' | |
xml_data = Nokogiri::XML(open("http://programm.froscon.org/2013/schedule.xml")) | |
conference = xml_data.xpath('//conference/title').text | |
days = xml_data.xpath('//*/day') |
This file contains hidden or 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
!!! | |
%html{:lang => "en"} | |
%head | |
%meta{:charset => "utf-8"}/ | |
%meta{:content => "", :name => "description"}/ | |
%meta{:content => "width=device-width", :name => "viewport"}/ | |
%meta{:content => "IE=edge,chrome=1", "http-equiv" => "X-UA-Compatible"}/ | |
%title= yield_content(:title) | |
/ The javascript and css are managed by sprockets. The files can be found in the /assets folder | |
%script{:src => "/assets/application.js", :type => "text/javascript"} |
This file contains hidden or 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/sh | |
MAIL_BIN=`command -v mail` | |
QMAIL_QUEUE_SIZE=`/var/qmail/bin/qmail-qstat | grep 'messages in queue:' | awk '{print $NF}'` | |
function send_notification_mail() { | |
$MAIL_BIN -s "WARNING: MAILQ critical on $HOSTNAME - size $QMAIL_QUEUE_SIZE" "[email protected]" <<EOF | |
Messages in queue: $QMAIL_QUEUE_SIZE | |
EOF | |
} |
This file contains hidden or 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
require 'pathname' | |
require 'open3' | |
# ffprobe output parser for deprecated ffprobe versions. | |
class FfprobeParser | |
# Get media properties for given file. | |
# | |
# @example Get properties for a given file. | |
# FfprobeParser.properties('/srv/file/video.mp4') |
This file contains hidden or 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
require "rexml/document" | |
require 'pathname' | |
require 'json' | |
require 'date' | |
SCHEDULE_XML = Pathname('schedule.xml') | |
# C01 or B05/B06 or B07/B08 or A08 | |
ROOM_PATTERN = 'C01|B05\/B06|B07\/B08|B09|A08' | |
# Lunch or Coffe Break or Breakfast | |
SKIP_EVENTS = '[Ll]unch|[Cc]offee\s[Bb]reak|[Bb]reakfast' |
OlderNewer