- ncurses Twitter client – bin ja nach
earthquake nun erstmal bei Echofon im Firefox.
- Icon Stocks
– Creative Commons und so, sehr nützlich.
- alternative (unabhängige) Top-Level-Domains
– erfordert allerdings Anpassung der /etc/resolv.conf, aber ‘ne nette Idee.
- FireWire attacks against Lion’s FileVault 2 – tja, aus diesem Grund habe
ich FireWire entfernt. Ein potentielles Problem weniger.
- collectd-Plugin für MongoDB – hab
ich im Einsatz und funktioniert einwandfrei.
- Kurzreferenzen bekannter Programmiersprachen – Übersicht – unter anderen mit
PHP, Perl, Python, Ruby, Tcl, Lua, JavaScript, Io,
C, C++, Objective C, Java, C# und ML, OCaml, Scala und Haskell
- Warum wir Quantencomputer wirklich …weiterlesen.
Shell:
sqlite3 my.db
>> SELECT * FROM sqlite_master;
python:
import sqlite3, os
con = sqlite3.connect("my.db")
with open("dump.sql", "w") as f:
for line in con.iterdump():
f.write("%s\n" % line)
via stackoverflow. Denn ich stehe auf Kriegsfuß mit dieser dämlichen SQL-Logik. CouchDB und MongoDB ftw.
Just a simple, fail-safe interpretation of time deltas using crontab-like
syntax using python’s horrible regular expression syntax.
import re
from datetime import timedelta
def tdelta(input):
keys = ["weeks", "days", "hours", "minutes"]
regex = "".join(["((?P<%s>\d+)%s ?)?" % (k, k[0]) for k in keys])
kwargs = {}
for k,v in re.match(regex, input).groupdict(default="0").items():
kwargs[k] = int(v)
return timedelta(**kwargs)
>>> print tdelta("3w")
21 days, 0:00:00
>>> print tdelta("3w 12h 57m")
21 days, 12:57:00
walk-through
datetime‘s timedelta object provides a fairly simple interface to add,
substract and compare datetime-objects in python. In my example, …weiterlesen.

CoudApp allows you to share any kind of data with your friends using
Amazon S3 as backend. It provides a verbose API and has several working
clients for iPhone, iPad and Android as well. Cloud.app is a really
handy, extendable Mac-client leaving nothing to be desired. CloudApp offers a
Pro mode, allowing you to share data up to 250 Mb and unlimited uploads as
well as links to your domain. For free you’ll get 10 uploads per day and a
filesize limit of 25 MiB.
I had some leisure time and found out, CloudApp’s services is similar to
Facebooks privacy options. Their security/privacy (marked as “private”) relies
simply on …weiterlesen.
tl;dr decrypt! RSDF, DLC und CCF online. In bunt und in Farbe!1
Nur so lange der Vorrat die API reicht. Entwicklung auf GitHub:
posativ/opendlc.
Ich bin es leid. Es gibt Software dafür, eine behinderter als die andere. Von
ganz schwer bis fast: jDownloader, Cryptload, CinuxLoader,
RSD/MSD und pyLoad. Alles ominöse Tools, um der Content-Mafia eins
auszuwischen und dabei selbst etwas Geld zu verdienen – mit Hehlerware.
Irgendwie sehr verlogen, diese „Szene”.
Stand der Dinge: Wir haben drei Container-Formate, namentlich: RSDF, CCF
und DLC, eingeführt von respektive: RapidShare Downloader (RSD),
Cryptload und JDownloader. Diese Container verstecken
verschlüsseln die URLs zu den Hostern wie RapidShare, uploaded.to,
Netload und so weiter, damit die gemeinen 14-jährigen …weiterlesen.
Heute mal durch und durch Python, zudem noch ein Jahr alt und eigentlich überflüssig
Ach, und reStructuredText hab ich auch noch!1
Und Sonstige! Alles muss raus!
pamela
Ich räume gerade meine Notizen auf und nun kommt alles mal zusammen. Es gibt als mächtigere Sprache (zu Kosten von Einfachheit natürlich) Pamela. Hat was vom erwähnten SHPAML, nur nicht ganz so hübsch. Eigentlich sogar hässlich, schon fast eine Art Semi-HTML.
<html
<head
<title:My first Pamela document
<body
<h1:Lorem ipsum
<p
Lorem <b:ipsum dolor sit amet>, consectetuer adipiscing elit. Sed
feugiat, dui eu …weiterlesen.
SHPAML ist ein verdammt schneller und einfacher HTML/XML-Preprocessor. Die Syntax lehnt sich
an Haml an und ermöglicht ein einfaches Programmieren einer Website. Für SHPAML gibt es kein
Syntax-Highlighting (obwohl das Python-Highlighting imho ausreicht) was auch nicht nötig ist, da
die Syntax auf einfachen Key-Symbolen und Einrückung basiert.
Python
>>> from shpaml import convert_text
>>> print convert_text("b | foo")
>>> '<b>foo</b>
Diese Markup-Sprache nutze ich mittlerweile in diversen Projekten, allen voran lilith und
pastebin. Als offenes Beispiel gebe ich mal die \<entry>-Spezifikation eines Atom-Feeds an. Das
Beispiel benötigt pro Durchlauf gerade einmal 243.54 µsec, also nicht mal eine Millisekunde, sodass
man SHPAML einfach überall nutzen muss.
Lang ist die letzte Linkschleuder her. Aber ich hab nebenbei noch etwas gesammelt:
Hey, my first post in english. It’s for search engine optimization only :P
I currently use this snippet
generator for my post previews. In some situation it behaves wrong (preservering whitespace
in pre-tags, to be precisely) and it is really hard to maintain. See the source code.
This is my first time using the HTMLParser of the
python standard library. It was really straight-forwarded to solve this without any side effects!
Currently, it is slower than the activestate-solution, which is about two times faster. Summarizing
Wiki-Software: MindTouch Deki with about 39 lines and 3483
characters takes about 20ms versus 40ms.
I have no plans to update this code listing, …weiterlesen.
ältere Beiträge →
← neuere Beiträge