This file contains 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
Some content from http://www.thegeekstuff.com/2009/04/15-practical-postgresql-database-adminstration-commands/ | |
1. How to change PostgreSQL root user password ? | |
$ /usr/local/pgsql/bin/psql postgres postgres | |
Password: (oldpassword) | |
# ALTER USER postgres WITH PASSWORD 'tmppassword'; | |
$ /usr/local/pgsql/bin/psql postgres postgres | |
Password: (tmppassword) |
This file contains 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
Catherina Fake | |
============== | |
I like pencil and paper, probably more than most people in tech. I use a Field Notes 80 page steno notebook for taking notes, and a Clairefontaine 4.5"x6.5" notebook for my to-do list. I like to number each thing I accomplish, and when I get to the end of the notebook, the number of things I have done is close to 5,000. This is very analogue, but there's a really excellent pencil sharpener Lifehacker readers should know about: the Automatic Long Point, 2 phase KUM sharpener, made in Germany. | |
Wisdom is pretty plain and unimpressive. Be nice. Floss regularly. Do your best. Don't let the grass grow on the path to your friend's house. Wisdom is always simple, but not easy. |
This file contains 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
MULTIPLE PORTS IN ONE HOST | |
--------------------------- | |
Syntax: | |
Port [port] | |
NameVirtualHost *:[another_port] | |
Listen [another_port] |
This file contains 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
Source http://www.women2.org/10-usability-takeaways-for-web-developers-dont-make-me-think/ | |
1. Behaviors of Web Users | |
We don’t READ, we SCAN. | |
We love to muddle through to figure things out. | |
We don’t make optimal choices, we love to guess and there’s no penalty when we guessed wrong. | |
2. Design Pages like Billboards | |
Pages should be designed for scanning, not reading. |
This file contains 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
List Comprehensions | |
===================== | |
list = [each + 1 for each in range(10)] | |
Ternary Operator | |
================= | |
x if a > b else y |
This file contains 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
""" | |
Distributor ID: Ubuntu | |
Description: Ubuntu 10.04 LTS | |
Release: 10.04 | |
Codename: lucid | |
Author: Adelein Rodriguez, [email protected] | |
Note: This is an adaptation from a fabric script presented here: | |
http://morethanseven.net/2009/07/27/fabric-django-git-apache-mod_wsgi-virtualenv-and-p.html | |
Summary: This script: |
This file contains 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
user = 'adeleinr' | |
messages_to_display = 5 | |
api = twitter.Api() | |
statuses = api.GetUserTimeline(screen_name=user, count=messages_to_display, include_entities=True) | |
messages = [] | |
for status in statuses: | |
# Replaces the @username mentions with a URL | |
replaced_mentions = re.sub(r'(@[^ $]+)', r'<a href="http://twitter.com/\1">\1</a>',status.text); | |
# Replaces the #tag's with a URL |
This file contains 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
Flush DNS Cache | |
OSX (10.5) | |
---------- | |
dscacheutil -flushcache | |
Windows | |
------- | |
C:\>ipconfig /flushdns | |
This file contains 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
Hide all windows --> Ctrl + Alt + d |