Skip to content

Instantly share code, notes, and snippets.

Twitter autoresponder bot

By Daniel15 (dan.cx) This is a very simple Twitter autoresponder bot. It requires PECL OAuth extension to be installed (run "pecl install oauth", or if on Windows, grab php-oauth.dll. If using cPanel you can install it via WHM). The authentication is designed for command-line usage, it won't work too well via a web browser. You'll have to sign up for an application on Twitter's site to get the consumer key and secret.

Could be modified to be more advanced (match regular expressions to answer questions, etc.)

Questions? See my blog post - http://dan.cx/blog/2011/06/twitter-autoreply-bot-dbznappa

Modified 2013-06-13 - Twitter API 1.0 discontinued, modified to use Twitter API 1.1

@vjo
vjo / gist:4381049
Created December 26, 2012 15:58 — forked from anonymous/gist:4381021
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX sim: <http://purl.org/ontology/similarity/>
PREFIX mo: <http://purl.org/ontology/mo/>
PREFIX ov: <http://open.vocab.org/terms/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
@vjo
vjo / mailx_site_monitor.sh
Created November 20, 2012 10:21 — forked from eykanal/mailx_site_monitor.sh
Simple tool using curl, mailx, and a crontab to monitor whether a site is up or not
#!/bin/sh
# How many seconds does it usually take your site to respond?
sec=2
# Try to download the site to a file
curl -s -m $sec example.org > /tmp/dltime
# Get size of file
a=`wc -m /tmp/dltime | awk '{print $1}'`
@vjo
vjo / gif.py
Created October 3, 2012 20:27 — forked from 2xyo/gif.py
Small script to send gif by mail...
#!/usr/bin/env python
import imaplib
from pprint import pprint
from email.parser import HeaderParser
from django.core.mail import EmailMultiAlternatives
from email.mime.message import MIMEMessage
from django.conf import settings
import os,random,sys
from email import Charset
from email.mime.image import MIMEImage