This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Twitter Auto-follow Script by Dave Stevens - http://davestevens.co.uk | |
$user = ""; | |
$pass = ""; | |
$term = ""; | |
$userApiUrl = "http://twitter.com/statuses/friends.json"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$xml=file_get_contents('http://twitter.com/users/show.xml?screen_name=catswhocode'); | |
if (preg_match('/followers_count>(.*)</',$xml,$match)!=0) { | |
$tw['count'] = $match[1]; | |
} | |
echo $tw['count']; | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import twitter, sys, getpass, os | |
def call_api(username,password): | |
api = twitter.Api(username,password) | |
friends = api.GetFriends() | |
followers = api.GetFollowers() | |
heathens = filter(lambda x: x not in followers,friends) | |
print "There are %i people you follow who do not follow you:" % len(heathens) | |
for heathen in heathens: | |
print heathen.screen_name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
command -range Twitter | |
<line1>, | |
<line2>write ++enc=UTF-8 !curl --data-urlencode status@- --netrc --no-remote-name http://twitter.com/statuses/update.xml | |
</line2></line1> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function get_status($twitter_id, $hyperlinks = true) { | |
$c = curl_init(); | |
curl_setopt($c, CURLOPT_URL, "http://twitter.com/statuses/user_timeline/$twitter_id.xml?count=1"); | |
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1); | |
$src = curl_exec($c); | |
curl_close($c); | |
preg_match('/<text>(.*)<\/text>/', $src, $m); | |
$status = htmlentities($m[1]); | |
if( $hyperlinks ) $status = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]", "<a href=\"\\0\">\\0</a>", $status); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$file = file_get_contents("http://search.twitter.com/search?q=gmail.com+OR+hotmail.com++OR+%22email+me%22"); | |
$file = strip_tags($file); | |
preg_match_all( | |
"([a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+(?:[A-Z]{2}|com|org|net|gov|mil|biz|info|mobi|name|aero|jobs|museum)\b)siU", | |
$file, | |
$matches); | |
print_r($matches); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/ruby | |
require 'rubygems' | |
require 'json' | |
require 'net/http' | |
require 'uri' | |
class TwitterBackup | |
def backup(username) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function timespan($time1, $time2 = NULL, $output = 'years,months,weeks,days,hours,minutes,seconds') | |
{ | |
$output = preg_split('/[^a-z]+/', strtolower((string) $output)); | |
if (empty($output)) | |
return FALSE; | |
extract(array_flip($output), EXTR_SKIP); | |
$time1 = max(0, (int) $time1); | |
$time2 = empty($time2) ? time() : max(0, (int) $time2); | |
$timespan = abs($time1 - $time2); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php include_once(ABSPATH . WPINC . '/rss.php'); | |
wp_rss('http://twitter.com/statuses/user_timeline/15985955.rss', 5); ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
rem ============================== | |
rem test for user input | |
rem ============================== | |
if [%1]==[] goto error | |
if [%2]==[] goto error | |
rem ============================== | |
rem set password and user name | |
rem ============================== | |
set user=%1 |