My New Venture (reblaze.com)
Posted: April 20, 2012 Filed under: Cyberlife, www | Tags: cloud, reblaze, saas, security, startup, www Leave a commentI have been quite busy lately, ever since I have started working on Reblaze in the winter last year (2011).
We all wish to make the world (wide web) a better place. I think we have found a way to improve the web, to make it a better, safer and cleaner.
I guess we can be categorized under the SaaS tag, in fact, we are SaaS x2, we provide Software as a Service, as well as Security as a Service.
Visit us at reblaze.com and read all about, as well as add your site, it is free now, and so it will remain for all those who join during public beta.
Installing oursql on ubuntu
Posted: April 10, 2011 Filed under: Python | Tags: mysql, oursql 1 Commentsudo aptitude install python-pip libmysqlclient-dev sudo pip install oursql
The Dark Magic of MongoDB
Posted: June 20, 2010 Filed under: Python | Tags: mongodb Leave a commentThere is no other explanation for this but magic, ha? Look at this sequence of commands I just typed in my terminal. I simply cannot decide whether this is great or scary, mean, who saved that data for me in between restarts? And do not get me wrong, I am all excited about MongoDB, yet, these ghost driven technology which works for you behind the scenes is a bit scary, ain’t it?
tzury@x200:/$ sudo service mongodb stop [sudo] password for tzury: mongodb stop/waiting tzury@x200:/$ status mongodb mongodb stop/waiting tzury@x200:/$ python Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41) [GCC 4.4.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from pymongo import Connection >>> Connection().test_db.books.count() 0 >>> Connection().test_db.books.insert({"autor": "Charles Dickens"}) ObjectId('4c1e592b6b13eb0ee3000000') >>> Connection().test_db.books.count() 1 >>> tzury@x200:/$ sudo service mongodb start mongodb start/running, process 3830 tzury@x200:/$ python Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41) [GCC 4.4.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from pymongo import Connection >>> Connection().test_db.books.count() 1 >>> Connection().test_db.books.find()[0] {u'autor': u'Charles Dickens', u'_id': ObjectId('4c1e592b6b13eb0ee3000000')} >>> >>>tzury@x200:/$
running wireshark as root on Mac OSX
Posted: February 22, 2010 Filed under: Python | Tags: mac, wireshark Leave a commentAfter installing the .dmg packge you should run
$ sudo /Applications/Wireshark.app/Contents/MacOS/Wireshark
In order to capture traffic on the interfaces
Default Parameters Values and Mutable/Callable Objects
Posted: December 11, 2008 Filed under: Python | Tags: Python 1 CommentQuoting from the python Language Reference[link]:
Default parameter values are evaluated when the function definition is executed.
This means that the expression is evaluated once, when the function is defined, and that that same “pre-computed” value is used for each call. This is especially important to understand when a default parameter is a mutable object, such as a list or a dictionary: if the function modifies the object (e.g. by appending an item to a list), the default value is in effect modified. This is generally not what was intended. A way around this is to use None as the default, and explicitly test for it in the body of the function, e.g. …
I was not aware of this. I have an excuse though, in previous versions of Python, language reference was described as “for language lawyers” [link]. Since I never liked lawyers, I never bothered reading it. I am happy though it was changed in current release and now it is described as “describes syntax and language elements”. I guess I have to read it now.
Below is an example for a bug I had caused by this feature and which made me aware of this issue.
>>> import time >>> def now(t=time.time()): ... print t ... >>> now() 1228988224.36 >>> now() 1228988224.36
Installing Python 3.0 on Ubuntu 8.10 Intrepid Ibex
Posted: December 4, 2008 Filed under: Cyberlife, Linux & OpenSource, Python, ubuntu | Tags: python python3 ubuntu install 21 CommentsUPDATE (Dec, 7): apt-get install python3
works now. this might be the prefered way for most of us.
Based on sofen’s blog’s post about python 2.6
This was the easiest thing I did recently. It went so smooth that this post is totally redundant.
Seven commands and you are all unicode.
Step 1: Make sure you got all the prerequisites
$ sudo apt-get install build-essential libncursesw5-dev libreadline5-dev libssl-dev libgdbm-dev libbz2-dev libc6-dev libsqlite3-dev tk-dev g++ gcc
Step 2: Grab the bits, extract them and build them
$ wget http://www.python.org/ftp/python/3.0/Python-3.0.tgz $ tar xvzf Python-3.0.tgz $ cd Python-3.0/ $ ./configure $ make $ sudo make install
That’s it my friend. You now have the best software development platform in the entire universe!
$ python3.0 Python 3.0 (r30:67503, Dec 4 2008, 21:27:40) [GCC 4.3.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>>
Good luck and enjoy the sweetness of open source software!
error_help() for python hackers
Posted: October 16, 2008 Filed under: Python | Tags: Python Leave a commentJust came across this what might be a usefull utility which provides help within the python interperter using collaborative data gathered at http://bug.gd
Example:
tzury@regulus:~$ sudo easy_install bug.gd
tzury@regulus:~$ sudo /usr/bin/python error_help_config.py
tzury@regulus:~$ python
Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 0/0
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ZeroDivisionError: integer division or modulo by zero
>>> error_help()
========== 1 of 7 ==========
Error: Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ZeroDivisionError: integer division or modulo by zero
Solution: I divided by zero as a test. Maybe you did the same thing? The trick is not to divide by zero!
...
...
Pydoc’s built-in HTTP server
Posted: September 10, 2008 Filed under: Python | Tags: Python 1 CommentJust came across this in python mailing list (link)
import pydoc
pydoc.gui()
(then click the ‘open browser’ button)
HotKeys jQuery Plug-In version 0.7 is out
Posted: September 5, 2008 Filed under: javascript, jquery, webdev, www | Tags: event, javascript, jquery, keyboard, opensource, webdev 5 CommentsLast night I released a new comprehenced version of jshotkeys. This plugin lets you easily add and remove handlers for keyboard events anywhere in your code supporting almost any key combination.
For example, to bind Ctrl+C
to a function fn
simply type:
$(document).bind('keydown', 'Ctrl+c', fn);
See the live demo.
A Couple of Nice and Handy Python Modules
Posted: August 2, 2008 Filed under: Deamon, Python, WiFI | Tags: Daemon, Python, WiFI 1 Commentpython-wifi 0.3.1
Python-Wifi is a Python library that provides access to information about a W-Lan card’s capabilities, like the wireless extensions written in C.
>>> from pythonwifi.iwlibs import Wireless >>> wifi = Wireless('eth1') >>> wifi.getEssid() 'romanofski' >>> wifi.getMode() 'Managed'
A simple unix/linux daemon in Python
by Sander Marechalsub-process usr/bin/dpkg returned an error code (2)
Posted: June 27, 2008 Filed under: Linux & OpenSource, ubuntu | Tags: apt-get, dpkg, ubuntu 4 CommentsI came across this annoying message and couldn’t get around it (running dpkg --configure -a
yields EOF related error message) until I ran dpkg --clear-avail
jQuery vs. Prototype
Posted: June 23, 2008 Filed under: Cyberlife, jquery, www Leave a commentjust put both libraries on wordle to visualize on which each library have focused.
Here are the results:
jQuery
Prototype
Choosing the right (open-source) tools
Posted: June 22, 2008 Filed under: Linux & OpenSource, Python, webdev, www | Tags: opensource, reddit, webdev Leave a commentFrom the announcement of the open source reddit:
There are only five of us who work on reddit; we couldn’t have made this site if it weren’t for a great community of developers. In no particular order, here’s a quick list of the open source products that reddit is built and runs upon: Debian, lighttpd, HAProxy, PostgreSQL, Slony-I, various python libraries, Psychopg, pylons, Solr, Tomcat, Ganglia, Mercurial, Git, gettext (translation), daemontools, and memcached.
Five people. 1,000,000’s of pages every day.
Do we need more facebok applications?
Posted: June 10, 2008 Filed under: Cyberlife, webdev, www | Tags: Cyberlife, facebook, web20, www 4 CommentsMy friend has 73 friends and 152 Facebook applications.
IMHO, the layout is lack of usability and functionality.
Let alone the fact each application require other users to install them in to their accounts in order to view standard web content (images, flash, videos, etc.)
I am sure Facebook’s dudes need to rethink the whole concept and come up with something more sensible.
def grab_contacts(ask_for_password = 0)
Posted: June 7, 2008 Filed under: Cyberlife, webdev, www Leave a commentstefan fountain -> coding horror -> hacker news
Stefan Fountain on June 5, 2008 05:37 AM
Too Bad To Be True (or Dear Ray Ozzie: IE8 can’t handle Windows Live)
Posted: March 11, 2008 Filed under: firefox, ie, ie8, javascript, microsoft, web-devel, webdev, www, www-design Leave a commentYesterday, while walking from launch, my freind Amnon David (the creator of jNext) told me that IE8 doesn’t work on hotmail.com.
Since IE8 release gained lots of credit by JavaScript Hackers (John Resig and many more), therefore, I couldn’t believe it until I saw it in my own eyes.
Plain and simple, the site is broken. Icons, texts, menus are overlapping each other.
Everyone can see now that every piece of DHTML code must be written twice, once for all the browsers, and then specifically for IE.
The unbearable lightness of releasing buggy software at MS is shocking.
The results are deployed here in front of your eyes.
IE 8 emulating IE7
Firefox 3 Beta 3
My Next Laptop Will NOT Be a Mac (But Dell’s)
Posted: March 6, 2008 Filed under: apple, dell, free, Linux & OpenSource, microsoft, opensource 1 CommentComparing to Microsoft aggressiveness, I was wondering whether Apple is just passive aggressive?
Both companies are making money selling proprietary, closed-source software (and hardware) . Perhaps Apple just dose it more gently with a wider smile on the face. That is all.
Even getting a legal copy of OS x runs on a virtual machine is almost impossible.
For now, I will stick with Dell which runs Linux smoothly.
The Winner Takes It All doesn’t work anymore, even for Microsoft
Posted: March 4, 2008 Filed under: .NET, free, ie, microsoft, open, opensource | Tags: .NET, free, ie, microsoft, open, opensource, standard Leave a commentMicrosoft interoperability announcement is a significant switch and a remarkable milestone onto the way to make the world of software an open, standardized and perhaps free as well. Especially regarding the IE8 default behavior.
Read more at:
- http://ejohn.org/blog/unbreaking-the-web/
- http://blogs.msdn.com/ie/archive/2008/03/03/microsoft-s-interoperability-principles-and-ie8.aspx
- http://www.microsoft.com/presspass/presskits/interoperability/default.mspx
I have said in the past that IE would eventually become an open source browser and so it would. I believe that by the year of 2013 .NET, IE and perhaps more products from Microsoft would be become open source projects.
There is no other way to keep your top rank in any business than being the best, by all means. Ever since the world of software have realized the the best way to write a software if the open-source way, Microsoft would have to join this principles in order to survive. The fact that more and more developers are switching to free and open-source tools, languages and platforms and barely the vice versa is the only fact that counts in the long run.
Huge Elements in Firefox 3 beta 3 on Ubuntu
Posted: February 28, 2008 Filed under: firefox Leave a commentIf you just installed firefox 3 beta 3 on ubuntu (sudo apt-get install firefox-3.0
), you may came across this issue where all elements are huge (toolbars, text, icons, etc.)
In order to fix it at address line go to about:config
(and promise to be careful ;-)) and set layout.css.dpi
to 96
.
How to install Infogami (+ PostgreSQL 8.2) on Ubuntu Gutsy Gibbon (7.10)
Posted: February 24, 2008 Filed under: infogami, postgres, postgresql, Python, ubuntu Leave a commentStep 1: PostgreSQL (8.2)
Installing postgresql (8.2)
sudo apt-get install postgresql-8.2
Setting up the password for postgres’ postgres
user
sudo -u postgres psql template1 ALTER USER postgres WITH PASSWORD 'your-password'; \q
Configure postgres’ authentication method :
sudo cp /etc/postgresql/8.2/main/pg_hba.conf /etc/postgresql/8.2/main/pg_hba.conf_bak sudo nano /etc/postgresql/8.2/main/pg_hba.conf
Add the following at the bottom of the file
# TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD host all all 127.0.0.1 255.255.255.0 password
Restart postgres:
sudo /etc/init.d/postgresql-8.2 restart
Step 2: Infogami
Get the code with:
sudo apt-get install mercurial hg clone http://infogami.org/hg/ infogami
Create your run.py
cd infogami nano run.py
Paste the following into the run.py
file:
import infogami infogami.config.db_parameters = dict(dbn='postgres', db="infogami", user='postgres', pw='your-password') infogami.config.site = 'sitename.local' if __name__ == "__main__": infogami.run()
Save and exit.
Grant permission to infogami (and it child nodes)
cd .. chmod -R 777 infogami/
Install Python Driver for PostgreSQL (python-psycopg2)
sudo apt-get install python-psycopg2
Create the database and install infogami objects into it
cd infogami sudo -u postgres createdb infogami sudo -u postgres psql infogami < infogami/tdb/schema.sql sudo -u postgres python run.py install
That’s it. You now have infogami installed on your machine.
to run it type:
sudo -u postgres python run.py
and nav your firefox to: http://loclahost:8080
How to Install PostgreSQL on Ubuntu Gutsy Gibbon (7.10)
Posted: January 21, 2008 Filed under: Linux & OpenSource, postgres, postgresql, ubuntu 4 CommentsUseful and simple guide, step by step.
http://www.supriyadisw.net/2007/02/postgresql-on-ubuntu-linux
Installing postgresql (8.2)
sudo apt-get install postgresql-8.2
Setting up the password for postgres’ postgres
user
sudo -u postgres psql template1 ALTER USER postgres WITH PASSWORD 'your-password'; \q
Configure postgres’ authentication method :
sudo cp /etc/postgresql/8.2/main/pg_hba.conf /etc/postgresql/8.2/main/pg_hba.conf_bak sudo nano /etc/postgresql/8.2/main/pg_hba.conf
Add the following at the bottom of the file
# TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD host all all 127.0.0.1 255.255.255.0 password
Restart postgres:
sudo /etc/init.d/postgresql-8.2 restart
The Truth About Python
Posted: January 18, 2008 Filed under: .NET, java, Python Leave a commentfrom: Python Is Not Java (dirtSimple)
So, if you don’t feel like you’re at least ten times more productive with Python than Java, chances are good that you’ve been forgetting to use the time machine! (And if you miss your Java IDE, consider the possibility that it’s because your Python program is much more complex than it needs to be.)
One might replace the word Java with .Net, it would remain the same, wouldn’t it?
Getting rid of Insert Ubuntu Disc Message
Posted: January 14, 2008 Filed under: Linux & OpenSource, ubuntu 9 CommentsThis “Insert Disc” message was annoying and frustrating almost at any time I was trying to install a new software on my Ubuntu (7.10 gutsy-gibbon).
Media change: please insert the disc labeled 'Ubuntu 7.10 _Gutsy Gibbon_ - Release i386 (20071016.1)' in the drive '/cdrom/' and press enter
If you want to get rid of it you should comment out the line that point to the “CD-ROM” Source.
Type the following in the terminal:
gksudo gedit /etc/apt/sources.list
Locate the line that reads:
deb cdrom:[Ubuntu 7.10 _Gutsy Gibbon_ - Release i386 (20071016)]/ gutsy main restricted
and comment it out
#deb cdrom:[Ubuntu 7.10 _Gutsy Gibbon_ - Release i386 (20071016)]/ gutsy main restricted
Save the file, close the editor, back in the terminal window type:
sudo apt-get update
Good luck and thank you for choosing Ubuntu.
The Zen of Steve Jobs
Posted: January 13, 2008 Filed under: apple, art, steve jobs, style, zen 8 CommentsEver wondered about Apples designers sources of inspiration?
I thinks I just found one, its name is Steve Jobs.
I was worth about over a million dollars when I was twenty-three
and over ten million dollars when I was twenty-four,
and over a hundred million dollars when I was twenty-five and it wasn’t that important because I never did it for the money.
The following is a photo was taken by Diana Walker and it shows Steve Jobs in his house in 1982
Jobs said about it:
This was a very typical time. I was single.
All you needed was a cup of tea, a light, and your stereo,
you know, and that’s what I had.
•Bare in mind• the fact that in 1982 Jobs was already 27 years old, 2 years after he was already worth more than hundred million dollars, and yet, he kept that elegant minimalism principle.
Jeff – here are the links for you:
Google Contacts API: http://code.google.com/apis/contacts/
Yahoo! Contact API: http://developer.yahoo.com/addressbook/
Windows Live Contact API: http://msdn.microsoft.com/en-us/library/bb463989.aspx
I’m glad these malpractices are getting more attention, they deserve to get the bad wrap on their wrist for these kind of infringements of respecting users’ data.