Browse Source

Add twitstat and some config updates

master
Duke Leto 15 years ago
parent
commit
7e603c5ba9
  1. 18
      bin/twitstat
  2. 3
      config/.bashrc
  3. 8
      config/.vimrc
  4. 15
      config/etc/hosts

18
bin/twitstat

@ -0,0 +1,18 @@
#!/usr/bin/perl -w
use Net::Twitter;
use strict;
$|++;
my ($username,$password) = @ARGV;
my $user = Net::Twitter->new({username => $username, password => $password });
my ($friends,$followers) = ($user->friends(), $user->followers());
my ($num_friends, $num_followers) = ($#$friends, $#$followers);
my ($friends_followers,$followers2) = (0,0);
map { $friends_followers += $_->{followers_count} } (@$friends);
map { $followers2 += $_->{followers_count} } (@$followers);
print "You have $num_friends friends and $num_followers followers\n";
printf "Friend/Follow Ratio: %.2f\n", $num_friends/$num_followers;
printf "Avg Friend Follow Count: %.1f\n", $friends_followers / $num_friends;
printf "Avg Follower Follow Count: %.1f\n", $followers2 / $num_followers;

3
config/.bashrc

@ -7,7 +7,8 @@ export LD_LIBRARY_PATH="/opt/local/lib"
[ -z "$PS1" ] && return
# This is ... madness.
export PERL5LIB="/opt/local/lib/perl5/site_perl/5.10.0:/Library/Perl/5.8.8"
export PERL5LIB="/opt/local/lib/perl5/site_perl/5.10.0:/opt/local/lib/perl5/site_perl/5.8.8:/Library/Perl/5.8.8"
export JSLIB=~/js
export TERMINFO=/usr/share/terminfo
export HISTCONTROL=ignoredups
export HISTCONTROL=ignoreboth

8
config/.vimrc

@ -107,6 +107,7 @@ nmap :X :x
nmap :xx :x!
nmap :Q :q
nmap :qq :q!
map :syn :syntax on
nmap <f5> :make<CR>
@ -136,14 +137,19 @@ map! ,kt <esc>:perldo s/^(\t+)/' ' x length $1/e<cr>i
map ,wt :perldo s/\s+$//<cr>
map! ,wt <esc>:perldo s/\s+$//<cr>i
map ,sd :w!<CR>:! svn diff % \| colordiff \| less -R<CR>
map! ,sd <ESC>:w!<CR>:! svn diff % \| colordiff \| less -R<CR>
map ,st :w!<CR>:! ispell -t % <CR>
map! ,st <ESC>:w!<CR>:! ispell -t % <CR>
map ,sp :w!<CR>:! ispell % <CR>
map! ,sp <ESC>:w!<CR>:! ispell % <CR>
map ,sb :w!<CR>:! svn blame % <CR>
map! ,sb <ESC>:w!<CR>:! svn blame % <CR>
map ,r :!chmod +x % && ./% <cr>
map ,R :!chmod +x % && ./%
@ -172,7 +178,7 @@ iab Ydate <C-R>=strftime("%a %b %d %T %Z %Y")<CR>
iab udd {use Data::Dumper; print Dumper [ ];}<esc>ei
set background=dark
syntax on
syntax off
let FILE="/home/leto/.vimrc.wordlist"
if filereadable(FILE)

15
config/etc/hosts

@ -10,6 +10,9 @@
fe80::1%lo0 localhost
69.55.236.53 leto.net
# fuck facebook
127.0.0.1 creative.ak.facebook.com
# begin fascism
127.0.0.1 ads234.com
@ -3466,7 +3469,7 @@ fe80::1%lo0 localhost
127.0.0.1 adserver9.contextad.com
127.0.0.1 adserverb.conjelco.com
127.0.0.1 adserversolutions.com
127.0.0.1 adservices.google.com
#127.0.0.1 adservices.google.com
127.0.0.1 adserving.cpxinteractive.com
127.0.0.1 adservingcentral.com
127.0.0.1 adsfac.net
@ -3977,7 +3980,7 @@ fe80::1%lo0 localhost
127.0.0.1 geoads.osdn.com
127.0.0.1 globalwebads.com
127.0.0.1 gm.preferences.com
127.0.0.1 googleadservices.com
#127.0.0.1 googleadservices.com
127.0.0.1 got2goshop.com
127.0.0.1 goto.trafficmultiplier.com
127.0.0.1 gozing.directtrack.com
@ -4309,10 +4312,10 @@ fe80::1%lo0 localhost
127.0.0.1 oz.valueclick.com
127.0.0.1 oz.valueclick.ne.jp
127.0.0.1 ozonemedia.adbureau.net
127.0.0.1 pagead.googlesyndication.com
127.0.0.1 pagead1.googlesyndication.com
127.0.0.1 pagead2.googlesyndication.com
127.0.0.1 pagead3.googlesyndication.com
#127.0.0.1 pagead.googlesyndication.com
#127.0.0.1 pagead1.googlesyndication.com
#127.0.0.1 pagead2.googlesyndication.com
#127.0.0.1 pagead3.googlesyndication.com
127.0.0.1 pages.etology.com
127.0.0.1 partner.ah-ha.com
127.0.0.1 partner01.oingo.com

Loading…
Cancel
Save