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 / PyS60_3rdFP1_accelerometer.py
Created March 4, 2010 17:24
PyS60 Accelerometer for 3rd edition (FP1 and FP2+)
#!/usr/bin/env python
# -*- encoding: UTF8 -*-
# originally from Andreas Jakl, 2009 on <http://www.symbianresources.com/tutorials/general/python/Python.pdf>
# modified 2010 by Philipp Klaus <philipp.l.klaus AT web-dot-de>
import appuifw,e32,sensor
def get_sensor_data(status):
@pklaus
pklaus / push-to-mobile.ps1
Created March 4, 2010 18:40
Time-lapse Photography Using Python S60
obexftp.exe -b 00:14:5d:5b:53:fc -B 11 --chdir /E:/Python/ --put ./time_lapse.py
@pklaus
pklaus / form.py
Created March 5, 2010 00:23
Advanced example for an PyS60 application that makes use of appuifw.app.set_tabs().
#!/usr/bin/env python
# -*- encoding: UTF8 -*-
# Advanced example for an PyS60 application that makes use of appuifw.Form().
# originally found on <http://www.mobilenin.com/pys60/info_tabs_forms.htm>
# changed and adopted for the N95 by Philipp Klaus <philipp.l.klaus AT web-dot-de>
# Copyright (c) 2006 Jurgen Scheible
# This script creates a form
@pklaus
pklaus / extract.pl
Last active September 4, 2015 15:35
plot run data of Garmin Forerunner using gnuplot
#!/usr/bin/perl
# untouched version originally found on <http://ww.telent.net/tmp/extract.pl> and <http://ww.telent.net/tmp/png.gp>
# <https://web.archive.org/web/20100928045039/http://www.coruskate.net/Garmin%20and%20Linux>
use strict;
use warnings;
use Getopt::Long;
use Math::Trig;
my $pi=2*acos(0);
/*
Torus to mug morphing animation, by Lucas V. Barbosa - January 17, 2007 - Coded in: POV-Ray 3.6
License:
Info
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Author user page: http://en.wikipedia.org/wiki/User:Kieff
The final animation at Wikimedia Commons: http://commons.wikimedia.org/wiki/Image:Mug__morph.gif
@pklaus
pklaus / wikibackup.sh
Created December 11, 2010 19:06
wikibackup – A Basic Backup Script for MediaWiki
#!/bin/sh
####################################################################
# #
# Basic Backup Script for MediaWiki. #
# Created by Daniel Kinzler, brightbyte.de, 2008 #
# #
# This script may be freely used, copied, modified and distributed #
# under the sole condition that credits to the original author #
# remain intact. #
@pklaus
pklaus / graphical_avrnetio.py
Created December 19, 2010 13:15
Connecting to AVR NET-IO with python with a graphical user interface – http://www.mikrocontroller.net/topic/180211
#!/usr/bin/python
#-*- coding:utf8 -*-
#=======================================================
# Connecting to AVR NET-IO with python
# with a graphical user interface
#=======================================================
# Funktionen:
@pklaus
pklaus / create-lxc-container.sh
Created January 25, 2011 01:08
Automates the steps to set up LXC containers with virtualized environments on Ubuntu Linux
#!/bin/bash
### Bash Script that automates the steps to set up an LXC (Linux Container) boxed environment on Ubuntu Linux
### <http://blog.philippklaus.de/2011/01/container-virtualization-using-lxc-on-ubuntu/>
###
### More inspiration can be found in <https://github.com/phbaer/lxc-tools> and in
### <https://github.com/halcyon/lxc-tools/commit/b428a6973dd12b75c2400d41f60c454e752c10c6> and
### <http://mindref.blogspot.com/2011/01/debian-lxc-create.html>.
###
### Written by Philipp Klaus <philipp.l.klaus @ web.de>
@pklaus
pklaus / clearRAM.sh
Last active January 8, 2024 08:00
A Script to Clear Cached RAM on Linux
#!/bin/bash
## Bash Script to clear cached memory on (Ubuntu/Debian) Linux
## By Philipp Klaus
## see <http://blog.philippklaus.de/2011/02/clear-cached-memory-on-ubuntu/>
if [ "$(whoami)" != "root" ]
then
echo "You have to run this script as Superuser!"
exit 1
fi
@pklaus
pklaus / ping.py
Created March 5, 2011 09:50
A pure python ping implementation using raw socket.
#!/usr/bin/env python2
"""
Other Repositories of python-ping
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* https://github.com/l4m3rx/python-ping supports Python2 and Python3
* https://bitbucket.org/delroth/python-ping