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 | |
# 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() { |
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
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 |
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/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. |
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 | |
import requests | |
import json | |
# Calculate file usage per user for shared files in Slack | |
# [email protected] | |
API_ENDPOINT="https://slack.com/api/%s" | |
TOKEN = "YOUR-TOKEN-HERE" |
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 | |
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} |
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
# 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 |
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
// Sketch that combines measurements from DHT22 and BMP180 sensors | |
// and prints them to serial. | |
// Aris Tzermias (github.com/tzermias) | |
// Pinout on Arduino Leonardo/Yun. | |
// Pin 2: SDA (BMP180) | |
// Pin 3: SCL (BMP180) | |
// Pin 4: DHT22 | |
#include "DHT.h" |
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
# This dockerfile clones github-analytics repository (https://github.com/kabitakis/github-analytics), installs prerequisites | |
# and runs the app. | |
# Start the container with `docker run -e TOKEN=test12345 <container>` | |
FROM node:latest | |
MAINTAINER tzermias | |
#Clone repository | |
RUN git clone https://github.com/kabitakis/github-analytics.git |
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 | |
VERSION=$(awk '{print $1}' /usr/local/psa/version) | |
VERSION_MAJOR=$(echo $VERSION | cut -d'.' -f1) | |
cat <<EOF | |
{ | |
"plesk_version" : "$VERSION", | |
"plesk_version_major" : "$VERSION_MAJOR" | |
} |
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 | |
""" racktables.py | |
Simple script that parses data from 'show mac address-table' command of Dell | |
Poweredge 5548 switch, and updates the Racktables DB accordingly | |
[email protected] | |
""" |
NewerOlder