###To laptop
Specify an IP address to eth0 (here 192.168.56.1)
sudo ifconfig eth0 192.168.56.1 netmask 255.255.255.0
#!/bin/bash | |
CGI_URL="https://server/icinga/cgi-bin" | |
USERNAME="" | |
PASSWORD="" | |
out=$(curl --silent -u $USERNAME:$PASSWORD "$CGI_URL/status.cgi?jsonoutput&servicestatustypes=28" |jq .status.service_status[].status 2>&1) | |
echo $out | awk 'BEGIN {RS=" ";d=0;c=0;u=0;w=0} |
#!/usr/bin/env python | |
import requests | |
import json | |
# Calculate file usage per user for shared files in Slack | |
# zacharias.tzermias@gmail.com | |
API_ENDPOINT="https://slack.com/api/%s" | |
TOKEN = "YOUR-TOKEN-HERE" |
#!/bin/sh | |
# Collect photos from penteli.meteo.gr and save them to a directory. | |
# github.com/tzermias | |
DOWNLOAD_DIR="$(dirname $0)/photos" | |
FILENAME="panorama_$(date +%s).jpg" | |
URL="https://penteli.meteo.gr/stations/penteli/webcam/panorama.jpg" | |
# Create directory to save images, if non-existent. |
ffmpeg -r 12 \ | |
-pattern_type glob -i 'photos/*.jpg' \ | |
-i audio.mp3 \ | |
-filter:v 'tblend,fade=t=in:s=0:d=2,fade=out:675:24' \ | |
-filter:a 'afade=in:ss=0:d=2,afade=t=out:st=56:d=3' \ | |
-vcodec libx264 -acodec mp3 panorama.mp4 |
# Set Ctrl+a as a prefix | |
set -g prefix C-a | |
unbind C-b | |
bind C-a send-prefix | |
# Indexes | |
set -g base-index 1 | |
set -g pane-base-index 1 | |
# Split panes |
#!/bin/bash | |
# meme.sh | |
# Meme generator with ImageMagick | |
# https://www.it-cooking.com/technology/digital-image/image-processing/meme-generator-imagemagick/ | |
usage() { | |
echo "Usage: $0 [ -t TOP_MSG ] [ -b BOTTOM_MSG ] SRC DST" | |
} | |
failure() { |
import MySQLdb.cursors | |
from twisted.enterprise import adbapi | |
from scrapy.xlib.pydispatch import dispatcher | |
from scrapy import signals | |
from scrapy.utils.project import get_project_settings | |
from scrapy import log | |
SETTINGS = get_project_settings() |