Skip to content

Instantly share code, notes, and snippets.

View pklaus's full-sized avatar

Philipp Klaus pklaus

  • Frankfurt, Germany
View GitHub Profile
@pklaus
pklaus / 1w.php
Created January 8, 2010 10:51
Ethersex ECMD via TCP socket communication with PHP, Python, Ruby: 1-wire communication
<html>
<!-- source: <http://www.ethersex.de/index.php/Dallas_1-wire_Bus#PHP> -->
<head>
<title>ethersex php example</title>
</head>
<body>
<?php
@pklaus
pklaus / netio230a.cpp
Created January 8, 2010 11:14
Simple Koukaam NETIO-230A automation via Raw TCP using C++, Java, PHP, Ruby, expect, Bash-TCP and wget (HTTP)
// example for a raw TCP socket connection using C++ to interface the Koukaam NETIO-230A
// resources:
// <http://www.ecst.csuchico.edu/~beej/guide/ipc/usock.html>
// <http://cs.nmu.edu/~randy/Classes/CS228/Notes/making-a-client-socket.html>
#include <iostream>
#include <string>
#include <unistd.h> // gethostbyname()
#include <sys/socket.h> // socket(), connect()
@pklaus
pklaus / fr.sh
Created January 8, 2010 11:19
NETIO230A Time Based Configuration Example using the Cron daemon an a Bash Script
#!/bin/sh
# source: <http://www.koukaam.se/koukaam/forum/viewthread.php?forum_id=18&thread_id=677#2106>
## Multiple power schedule script
## Script 2 of 2
## piping power-fr.sh output to telnet
## you have to set the correct paths from / to the script and telnet
@pklaus
pklaus / client3.java
Created January 8, 2010 15:06
Small Java speed test for the ethersex platform.
// original script by Oliver Reimann
// <http://list.zerties.org/pipermail/ethersex-devel/attachments/20090223/36379536/client3.java>
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.Socket;
import java.net.UnknownHostException;
@pklaus
pklaus / netio230a_changelog.md
Created January 8, 2010 16:50
Koukaam NETIO-230A changelog

Version 2.34 rc1

Release 11.10.2011

  • fixed http post
  • fixed cookie name issue
  • fixed stability issues
  • fixed old CGI security leak with a guest account
  • kshell allows up to 6 simultaneous connections, network and serial at once
  • CGI script format changed:
    old format: message 1. control.tgi?l=p:user:password
#!/usr/bin/env python
# coding: iso-8859-15
# -*- Python -*-
"""
Script to create dumps from mailboxes in a given imap server
Some parameters must be provided as arguments.
#!/usr/bin/env python
"""IMAP Incremental Backup Script v.1.4c (Dec 12 2009) found on http://the.taoofmac.com/space/Projects/imapbackup"""
__version__ = "1.4c"
__author__ = "Rui Carmo (http://the.taoofmac.com)"
__copyright__ = "(C) 2006 Rui Carmo. Code under BSD License.\n(C)"
__contributors__ = "Bob Ippolito, Michael Leonhard, Giuseppe Scrivano <[email protected]>, Ronan Sheth, Brandon Long"
# = Contributors =
# Brandon Long (Gmail team): Reminder to use BODY.PEEK instead of BODY
@pklaus
pklaus / dictcn.js
Created January 24, 2010 18:41 — forked from hzmangel/x
shadow removed (+ js markup on gist.github.com)
CmdUtils.CreateCommand({
name: ["dictcn", "dcn"],
author: {
name: "Hu Ziming",
email: "[email protected]"
},
contributors: ["Hu Ziming", "azuwis"],
icon : "http://dict.cn/favicon.ico",
description: "Consulting the word from <a href=\"http://dict.cn\">http://dict.cn</a>.",
help: "Consulting the word from <a href=\"http://dict.cn\">http://dict.cn</a>.",
@pklaus
pklaus / handbrakeAutorip.sh
Created January 27, 2010 08:48
Rip a DVD in an Automated Way
#!/bin/bash
# found on <http://episteme.arstechnica.com/eve/forums/a/tpc/f/96509133/m/792004650041?r=798009370041#798009370041>
# Exit Codes
# 1 : vobcopy failed
# 2 : encoding failed
# 3 : lock file present
# 4 : DVD not mounted
# 5 : VIDEO_TS not present - probably not a video DVD
@pklaus
pklaus / netio230a_Interact.cs
Created January 29, 2010 09:32
Example Usage of the NETIO-230A class written in C#
// example of usage of the class for the Koukaam NETIO-230A written in C#
// find it on <http://koukaam.se/koukaam/forum/viewthread.php?forum_id=33&thread_id=1569>
using System;
using CSC.Koukaam.NetIO230A.DiscoverProtocol;
using CSC.Koukaam.NetIO230A;
namespace netio230a_cs
{