grep -l “some_string” a-directory/*.html– finds all htlm files in “a-directory/” which contain the string “some_string” inside them and outputs the list of files
coding laser focus with Daft Punk Aerodynamic
python -c ‘import settings’ :)
$ convert some_image_with_white_background.png -resize 20% -transparent...– Nifty little trick for quick resize and transparency
How to start and stop your psql
http://nickcharlton.net/post/postgres-on-lion $ pg_ctl -D /usr/local/var/postgres/ -l /usr/local/var/postgres/server.log start $ pg_ctl -D /usr/local/var/postgres/ stop -s -m fast
Sometimes our database wants to be left alone
At Re.nooble, we develop across timezones and platforms. It is a lot of fun, but sometimes tough to control different code versions and databases. To simplify the code sharing, we use git. Sharing a database is not much harder, since you can run a database online and you connect the django setup with the online server. The introduction from webfaction explains nicely how you can do that. ...
PostGis - Troubleshooting on Ubuntu 11.10
Step 1 (install the stuff) $ sudo apt-get install postgresql-9.1 postgresql-server-dev-9.1 postgresql-9.1-postgis $ sudo apt-get install binutils gdal-bin python-psycopg2 python-setuptools Step 2 (create templates) create a POSTGIS template (from which your databases will be derived) $ POSTGIS_SQL_PATH=`pg_config --sharedir`/contrib/postgis-1.5 # Creating the template spatial...
git funny (scary?) story
from DavidSweetman, Several months ago when I first started using git, I made a terrible mistake. It was one of the first command-line tools I had used, and I didn’t realize “git init” was invoked on the current directory. So I ran it on my home directory, thinking that some time later git would prompt me for the path for the repo. After a “git add .”, I had added...