I hereby claim:
- I am mapkyca on github.
- I am mapkyca (https://keybase.io/mapkyca) on keybase.
- I have a public key ASCIDBawC_Ho4zeR5v42rPJrp_ZfMg9Q-lCpE8-InQBScwo
To claim this, I am signing this object:
import re | |
def callback(match): | |
return "<a href=\"http://github.com/%s>%s</a>" % (match.group(0), match.group(0)) | |
string = "this is a #test #32345 dfsdf" | |
print re.sub('#[0-9]+', callback, string) |
// Quick regexp to remove non-alpha chars from a string. Very handy | |
$string = preg_replace("/[^a-zA-Z0-9\s]/", "", $string); |
I hereby claim:
To claim this, I am signing this object:
curl -L https://example.com/key.pgp | gpg --import |
curl http://localhost/~marcus/awstats/domain/month/awstats.localhost.downloads.html | grep 'http://your.domain/you/are/interested/in' | sed -ne 's/.*\(http[^"]*\).*/\1/p' >> /tmp/files.csv | |
cat /tmp/files.csv | sort | uniq > /tmp/sorted.csv |
wget --spider -o wget.log -e robots=off -w 1 -r -p URL |
<?php | |
/** | |
* Genetic algorithm test. | |
* This is basically a rough implementation of the Weasel program | |
* https://en.wikipedia.org/wiki/Weasel_program | |
*/ | |
$ascii = "abcdefghijklmnopqrstuvwxyz "; // Ascii characters |
SUBJECT=`formail -xSubject:` | |
FROM=`formail -xFrom:` | |
:0 c | |
*^To:.*root.* | |
|formail -I "" | gpg --trust-model always -ear "marcus@marcus-povey.co.uk" | mail -r "$FROM" -s "$SUBJECT" marcus@example.org |
// Try simple regex, strip quoted (>) replies from an email | |
return preg_replace('/(^\w.+:\n)?(^>.*(\n|$))+/mi', '', $message); | |
// Try simple regex, strip replies from email using > | |
return preg_replace('/(^\w.+:\n)?(^>.*(\n|$))+/mi', '', $message); |
import piface.pfio | |
import time | |
import sys | |
import syslog | |
import json | |
import urllib | |
import httplib | |
class SecurityIndicator: | |
""" A switch and LED link: Displays light when switch is closed """ |