~bin/
things in my bin
Mon Nov 23 09:58:21 2009
def cjk(str):
    '''
    rudimentary CJK detection
    seems like a lot of it is between these two ranges.
    cf. http://www.alanwood.net/unicode/fontsbyrange.html
    '''
    ranges = [(12272,12287), (19968, 40959)]
    for i in str:
        j = ord(i)
        for (low, high) in ranges:
            if j > low and j < high:
                return True
    return False
Sat Jul 11 02:09:06 2009

I absolutely adore the popular new microblogging service, twitter. But lately, it's been overrun with spammers. I'm sure many of you are as unhappy as I am to see such a promising and exciting new service despoiled, so I'd like to share a couple tips I've picked up along the way, on how you and I, how we, can help combat this.

  1. Twitter has an @spam account for reporting spam. When you see spam, simply RT is to @spam. Sometimes they can be slow to respond, so if you don't get a response after a few minutes, you can RT it again.

  2. Particulary egregious spam needs swift action. If a spammer is being especially horrible, RT their tweets to all your friends and followers, encouraging them to RT to @spam. Muliple offended parties will more quickly get the spam fighting team's attention - it may even become a trending topic, where it can easily gain momentum and be noticed. This is highly effective.

Please pass this along to others and do your part to decrease the volume of spam on twitter, and keep it the wonderful place @where we #blog.

Thu May 7 21:55:50 2009

Made this little wrapper around the delightful automeme service for easy spamming with irssi. I have /meme aliased to /exec -o meme and it annoys the hell out of esch.

#!/bin/sh
# topical memes
# example:
#  ~$ meme poop lol
#  BITCHES DON'T LOL ABOUT MY POOP
# prefix
#  ~$ meme -p "twit @esch" poop lol
#  twit @esch ceiling h4x0r is poop you lol

[ "$1" = "-p" ] && {
 PREFIX="$2 "
 shift 2
}

URL="meme.boxofjunk.ws/moar.txt?lines=1"

curl -s $URL | awk -v m="$*" -v prefix="$PREFIX" '
 BEGIN { split(m, a, " ") }
 {
  for( x in a ) $(int(NF * rand()) + 1) = a[x]
  print prefix tolower($0)
 } 
'
[newer][older]