Unboxing and PhotoReview of Macbook PRO 15-inch
Tuesday, October 6th, 2009Click here to see and read the rest. Check out the descriptions and mouse over the images to learn the details.
Click here to see and read the rest. Check out the descriptions and mouse over the images to learn the details.
After updating from Tiger to Leopard I started getting this error whener I tried to execute emacs:
Fatal malloc_jumpstart() error
The solution was basically to reinstall it with dumpemacs
sudo mv /usr/bin/emacs-i386 /usr/bin/emacs-i386.backup
sudo /usr/libexec/dumpemacs -d
emacs --version
emacs
FOR IMMEDIATE RELEASE:
FrostWire 4.13.5 is now available for MS Windows, Mac OSX and Linux. Major updates improve network bootstraping and peer discovery. 4.13.5 includes improvements on the Chatroom tab, Audio Previews and more.
Other improvements have taken place for the FrostWire build process (for developers this means true One-Step builds for all versions). Updates on translations have been made thanks to the feedback from users in Poland and throughout Latin America. .
In more detail users can expect the following:
Users can see the available smileys by entering the command
/smileys

Now its possible to see and use Smileys from the Community Chat tab, Smiley display can be enabled or disabled from the view menu:

Users can also toggle Smiley display directly from the chat window by typing the command
/tsmileys

Bug Fixes and other improvements for this release also include:
Users can find now by details without the auto-focusing problem.
FrostWire 4.13.5 is expected to be the last of the 4.13.x series.
About FrostWire
FrostWire, a Gnutella Peer-to-Peer client, is a collaborative effort from many Open Source and freelance developers located from all around the world. In late 2005, concerned developers of LimeWire’s open source community announced the start of a new project fork “FrostWire” that would protect the developmental source code of the LimeWire client and any improvements to the Gnutella protocol design. The developers of FrostWire give high regard and respect to the GNU General Public License and consider it to be the ideal foundation of a creative and free enterprise market.
Para los amigos que se inician en el mundo *nix, ya sea con su nueva Mac, o con una PC corriendo Linux,
les recomiendo que aprendan a manejar bien los siguientes lenguajes, y el mundo sera suyo:
- bash scripting (aliases, variables, exports, iteraciones, condicionales)
- python (para programar logica mas compleja y portatil en cualquier sistema operativo)
- Uso de comandos como grep, egrep, awk (editor de streams) entre otros
- Expresiones regulares
En wedoit4you.com hicimos un simple script que va logeando visitas desde los blogs registrados.
Los blogeros ponen un pedacito de javascript, que al ser invocado, escribe una entrada en un log en el servidor.
Luego tenemos un script que analiza ese log, elimina cualquier intento de hacer muchos clicks, etc. etc.
Ese script se encarga luego de hacer matching de las URLs entrantes, con las URLs de los posts que wedoit4you.com
ya leyo. Este script lamentablemente tarda mucho en analizar mas de 150mb de data, mas lo que haya en el log,
y Dreamhost lo mata si dura mas de un minuto, o si hay mas de N procesos corriendo.
Que hacemos entonces?
Ponemos ese script en una maquina local, donde tenemos todo el cpu, y hacemos que el servidor a ciertas horas
del dia, haga un mysqldump de las tablas que me interesan (BLOGS, BLOG_POSTS, POST_HITS) y meta eso en un archivo
disponible via HTTP.
#!/bin/bash
DUMP_DIR=/home/cuenta_en_server/sitio.com/temp/
SQL_FILE_NAME=clicktrackr_dump.sql
SQL_FILE=${DUMP_DIR}/${SQL_FILE_NAME}
TGZ_FILE=${SQL_FILE_FNAME}.tar.gz
mysqldump bd_en_servidor BLOGS BLOG_POSTS POST_HITS > ${SQL_FILE}
cd ${DUMP_DIR}
pwd
echo Making tar
tar cfz ${TGZ_FILE} ${SQL_FILE}
echo Tar with SQL dump ready to be downloaded.
echo Finished.
Este script corre digamos a las 4am en el servidor.
Luego desde la casa
Luego en la maquina local corre un cronjob a las 4:30am, En mi caso una apple iMac Intel, y he aqui el poder de tener una Mac basada en Unix, y no la cagada de windows de mierda.
Hice sencillo bash script que se baja ese dump de la base de datos, y se baja el log del clickTracker para hacer los calculos en mi cpu,
(con el cual hago lo que me da la gana), los calculos son realizados con un script en python (click_tracker.py, incluido al final)
y una vez que termina de calcular, hace ftp de vuelta hacia el servidor y sube un archivo SQL
con instrucciones SQL para que se actualizen los hits de los posts. Este archivo de lolas que no lo subo a un directorio disponible en apache
pq alguien podria meterse con el y alterarnos los hits… Este Script local luce asi:
#!/bin/bash
rm /Users/gubatron/clicktrackr/*.tar.gz
rm /Users/gubatron/clicktrackr/*.sql
rm /Users/gubatron/clicktrackr/*.dat
rm /Users/gubatron/clicktrackr/*.log
echo "Downloading dump from server..."
wget http://www.wedoit4you.com/dir_del_dump/clicktrackr_dump.sql.tar.gz -O /Users/gubatron/clicktrackr/clicktrackr_dump.sql.tar.gz
cd /Users/gubatron/clicktrackr/
echo "Uncompressing Dump..."
tar xfz clicktrackr_dump.sql.tar.gz
echo "Loading data in MySQL"
mysql --user=usuario --password=password --database=bd_local < clicktrackr_dump.sql
echo "Downloading latest tracker.log"
wget http://www.wedoit4you.com/xxxxxxxxx/logs/tracker.log -O /Users/gubatron/clicktrackr/tracker.log
echo "Crunching Data with python script"
python click_tracker.py
echo "Compressing data crunched"
tar cvfz clicktrackr_update_tables.sql.tar.gz clicktrackr_update_tables.sql
echo "Uploading data"
#then upload tar.gz clicktrackr_update_tables.sql
ftp -u ftp://usuario:password@wedoit4you.com/directorioNoAccesiblePorApache/ clicktrackr_update_tables.sql.tar.gz
echo "Finished"
La salida de este script cuando se ejecuta es similar ea esto
imac:~ gubatron$ clicktrackr_processing
Downloading dump from server...
--09:45:14-- http://www.wedoit4you.com/xxxxxxx/clicktrackr_dump.sql.tar.gz
=> `/Users/gubatron/clicktrackr/clicktrackr_dump.sql.tar.gz'
Resolving www.wedoit4you.com... 208.113.146.143
Connecting to www.wedoit4you.com|208.113.146.143|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 41,227,814 [application/x-tar]
100%[====================================>] 41,227,814 86.84K/s ETA 00:00
09:53:18 (83.35 KB/s) - `/Users/gubatron/clicktrackr/clicktrackr_dump.sql.tar.gz' saved [41227814/41227814]
Uncompressing Dump...
Loading data in MySQL
/Users/gubatron/bin/clicktrackr_processing: line 12: clicktrackr_dump.sql: No such file or directory
Downloading latest tracker.log
--09:53:20-- http://www.wedoit4you.com/xxxxxxxxxxxxxx/tracker.log
=> `/Users/gubatron/clicktrackr/tracker.log'
Resolving www.wedoit4you.com... 208.113.146.143
Connecting to www.wedoit4you.com|208.113.146.143|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3,220 [text/plain]
100%[====================================>] 3,220 --.--K/s
09:53:23 (33.72 KB/s) - `/Users/gubatron/clicktrackr/tracker.log' saved [3220/3220]
Crunching Data with python script
/Users/gubatron/clicktrackr
No timestamp from last time found.
Loading data from ClickTrackr log...
Saving ClickTrackr data to File...
Saving completed.
Loading Blogs and Last Posts from DB
Saving Blogs to File...
Saving completed.
Loading Posts from DB...
Saving Posts from DB on file
Saving completed.
Crunching data...
0 converted from blog to last post
Didnt find total 11 urls.
Didn't find distinct 11 urls.
Saving crunched data...
Data saved.
Writing SQL...
Finished Writing SQL
Wrote last timestamp.
Compressing data crunched
clicktrackr_update_tables.sql -> clicktrackr_update_tables.sql.tar.gz
Uploading data
Connected to wedoit4you.com.
220 ProFTPD 1.3.0rc2 Server (DreamHost FTP) [208.113.146.143]
331 Password required for wedoit4y.
230 User wedoit4y logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
200 Type set to I
250 CWD command successful
local: clicktrackr_update_tables.sql.tar.gz remote: clicktrackr_update_tables.sql.tar.gz
229 Entering Extended Passive Mode (|||57539|)
150 Opening BINARY mode data connection for clicktrackr_update_tables.sql.tar.gz
100% |*************************************| 550 KB 155.72 KB/s 00:03
226 Transfer complete.
563661 bytes sent in 00:03 (143.48 KB/s)
Finished
Una vez que la data fue procesada y FTPeada al servidor, hay otro cronjob que corre una hora mas
tarde, y este asume que el nuevo archivo con la data procesada estara ahi, podriamos agregarle mas
checks, utilizando "stat" y anotando el ultimo timestamp del sql utlizado la vez anterior cosa que no
volvamos a anotar los hits del dia anterior...
Asi luce el script para actualizar finalmente en el servidor:
#!/bin/bash
DIR_PRIVADO=/home/usuario/dirPrivado
PATH_DEL_TRACKER_LOG=/home/usuario/algunaCarpeta/tracker.log
cd ${DIR_PRIVADO}
rm *.sql
tar xvfz clicktrackr_update_tables.sql.tar.gz
mysql bd_en_servidor < ${DIR_PRIVADO}/clicktrackr_update_tables.sql
rm *.tar.gz
rm *.sql
rm
touch ${PATH_DEL_TRACKER_LOG}
chmod 777 ${PATH_DEL_TRACKER_LOG}
Si tienes curiosidad de ver como cruncheo la data localmente, aqui esta el codigo en python.
(Es aun un trabajo en progreso)
#!/home/wedoit4y/bin/python/bin/python2.5
# This is the script that processes the ClickTrackr Log
import os
import sys
import pickle
import time
#NAMES OF FILES WHERE WE'LL STORE THE DIFFERENT STAGES OF RETRIEVED
#AND PROCESSED DATA.
#File that holds a dictionary with URLs and HITs we got from the original log file
FILE_MAX_AGE=3600*1
FILE_TIMESTAMP="clicktrackr_last_timestamp.dat"
FILE_001="clicktrackr_001_url_hits.dat"
FILE_002="clicktrackr_002_blogs_lastposts.dat"
FILE_003="clicktrackr_003_posts_hits.dat"
FILE_004="clicktrackr_004_processed_hits.dat" #...and urls not found
FILE_SQL="clicktrackr_update_tables.sql"
try:
import snowrss_config
from snowrss_config import getDbCursor
#from snowrss import *
except Exception,e:
print "Could not import snowrss_config [%s]" % e
sys.exit()
def dbExec(sql):
"""Give it some SQL and it will return the returning cursor"""
try:
cursor = getDbCursor()
cursor.execute(sql)
cursor.connection.close()
except Exception, e:
#MySQL has gone away
print 'dbExec(%s): ' % unicode(sql)
print e
return None
return cursor
def isFileFresh(fileName):
"""
Returns True if the file is still good to be used.
Othewise returns false
"""
try:
file_stat = os.stat(fileName)
file_age = time.time() - file_stat.st_mtime
if file_age > FILE_MAX_AGE:
return False
return True
except:
return False
def getData(line):
"""Returns a dict with, IP, Timestamp, URL and User Agent if found
Parameters
line - A Line with a ClickTracker log entry
Output
{'ip':...,'timestamp':...,'url':....,'ua':...}
ip-> IP Addres
time -> Time of the event
url -> Referer Url
ua -> User Agent of the rerferer user
"""
l = line.split()
result = {}
result['ip']=l[0]
result['time']=l[1]
result['url']=l[2]
result['ua']='N/A'
if len(l)>3:
rest = l[3:]
ua_name = ''
for b in rest:
ua_name = ua_name + ' ' + b
result['ua'] = ua_name
return result
#Maximum time to count a click from the same IP on the same URL
TIME_BETWEEN_CLICKS = 12*3600
#On the last run (if finished, we write down the time of the last timestamp on file)
#If we did finish a run, we'll get this number from the timestamp file, and we'll ignore
#all previous log entries to that timestamp.
LAST_TIMESTAMP = None
POSSIBLE_LAST_TIMESTAMP = None
try:
f = fopen(FILE_TIMESTAMP,"rb")
LAST_TIMESTAMP = pickle.load(f)
LAST_TIMESTAMP = long(LAST_TIMESTAMP)
f.close()
except:
print "No timestamp from last time found."
urls = {}
urls_not_found = {}
LOG_CLICK_TRACKER='tracker.log'
#check if there is a version of the log file backed that's still good enough to be used.
USABLE_LOG_FILE = LOG_CLICK_TRACKER
#use a copy of the log if we got some pickled data
if isFileFresh(LOG_CLICK_TRACKER + '.last') and isFileFresh(FILE_001):
USABLE_LOG_FILE = LOG_CLICK_TRACKER + ".last"
IGNORED_ENTRIES = 0
if not isFileFresh(FILE_001):
#open the tracker log (current or old)
print "Loading data from ClickTrackr log..."
f = open(USABLE_LOG_FILE,'r')
f.seek(0,2)
eof = f.tell()
f.seek(0)
while f.tell() < eof:
entry = getData(f.readline())
url = entry['url']
ip = entry['ip']
timestamp = entry['time']
if LAST_TIMESTAMP is not None and long(timestamp) < LAST_TIMESTAMP:
print "i",
IGNORED_ENTRIES += 1
continue
POSSIBLE_LAST_TIMESTAMP = long(timestamp)
if not url.startswith('http') or \
url.startswith('http://babelfish.altavista.com') or \
url.startswith('http://6'):
#IGNORED_ENTRIES += 1
continue
#Ask if this URL is already there
if urls.has_key(url):
#Ask if this IP is already there
if urls[url].has_key(ip):
#Get the last time stamp inside this IP
times = urls[url][ip]
last_time = times[len(times)-1]
delta_time = long(timestamp) - long(last_time)
#If its been more than acceptable time
if delta_time >= TIME_BETWEEN_CLICKS:
urls[url][ip].append(timestamp)
hits = 0
for ipbuffer in urls[url]:
if ipbuffer == 'hits': #just count the keys that are not 'hits'
continue
hits += len(urls[url][ipbuffer])
urls[url]['hits'] = hits
else:
urls[url][ip] = [timestamp]
urls[url]['hits'] = 1
else:
urls[url]={}
urls[url][ip] = [timestamp]
urls[url]['hits']=1
f.close()
urls['POSSIBLE_LAST_TIMESTAMP'] = POSSIBLE_LAST_TIMESTAMP
#we serialize this data for later
if IGNORED_ENTRIES > 0:
print "Ignored %d entries." % IGNORED_ENTRIES
print "Saving ClickTrackr data to File..."
f = file(FILE_001,"wb")
pickle.dump(urls,f)
f.close()
print "Saving completed."
#we make a backup of the current ClickTrackr log (.last), in case we need to run again
#we can diff with this to know from where to relog in the future
os.system("cp %s %s" % (LOG_CLICK_TRACKER,LOG_CLICK_TRACKER + ".last"))
else:
#we unserialize the data
print "Loading ClickTrackr data from existing file..."
f = file(FILE_001,"rb")
urls = pickle.load(f)
f.close()
POSSIBLE_LAST_TIMESTAMP = urls.pop('POSSIBLE_LAST_TIMESTAMP') #we popup so we have only urls and we dont modify further down
print "Loading completed."
#LOAD ALL BLOG POST URLS, IDS AND CURRENT NUMBER OF HITS.
blog_urls = {} #blogs hashed by their urls, Buckets have {'post_id':
Aqui los dejo con 2 videos.
Instale el VirtueDesktops para cambiar de escritorios con efectos especiales, y el otro video mientras instalo Windows XP SP2 en un disco duro virtual con un ISO torrenteado. La version de Parallels es un trial de 15 dias, si funciona al pelo creo que vale la pena comprarlo, es preferible que comprar una PC nueva.
So I wanted to use the GIMP, and OpenOffice, being a good Open Source boy on the new iMac.

The only problem is that you need to have X11 installed.
So first thing you do, is you google and you find this page:
http://www.apple.com/downloads/macosx/apple/x11formacosx.html
which has a 43mb installer that at least for me errored out saying I had something newer installed. Then all READMEs say that if you have Tiger installed you need to install X11 from the Mac OSX installation disc.
If you go to the disc and try to install from the Install Bundled Software Only you are not going to find it.
After wasting time, I found a the silver bullet on the disc:
/System/Installation/Packages/X11User.pkg
Then after I installed, on the Root of the Disc I saw another Icon called "Optional Installs", guess what? It was there also…
Anyway, I hope you find this post if you're in the same trouble I didn't read anything on apple's site on how to get to it on the disc.
Oh, and one cool thing you get by installing X11 -> xterm (yay!)