###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
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() |
#!/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() { |
# 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 |
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 |
#!/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. |
#!/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/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} |
// 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" |
rate_limit = api.rate_limit_status() | |
[key2 for key in rate_limit['resources'] for key2 in rate_limit['resources'][key].keys() if rate_limit['resources'][key][key2]['remaining']==0] |