Computers

Sync files and directories using Rsync, Zenity, SSH and cron

My systems as performed: Ubuntu 10.04 Localhost, Debian 6.03 Remotehost

1) Configure your systems for an SSH public/private keypair (see ref: 1 below)

2) configure local user's bash environment: (see ref: 5)

edit ~/.bashrc and add this line:

xhost local:your_localuser > /dev/null

3) create rsync script:

Hacked by Li


A tranche of daily Http: requests to my server, a peculiar block of chinese addresses and other IPs in my apache conf blacklist. These guys are fucking relentless.


Perl script scraping the Apache error logs and poking them into mysql using DBI:
teaserpic: 

What is the Cat Cam ?

This was one of the original objectives for my home-server system. Since I'm leaving a computer running full time with a 5/30Mb internet connection, I might as well make it pay for itself.

Take a $29 webcam, add Zoneminder open source software (on top of a LAMP) and you have an in-home security and monitoring system.

teaserpic: 

Drupal WYSIWYG module and gallery.menalto.com hack

Gallery2 image buttons missing from the your rich-text editor ? I'm sure this is relevant to the other CMS', Joomla and wordpress.
From the drupal issues queue http://drupal.org/node/300305
http://drupal.org/node/350100

G2-icon-tinymce

Locate the wysiwyg_tinymce_plugins function in tinymce.inc
teaserpic: 

Gallery2 .htaccess rewrite conditions

# BEGIN Url Rewrite section
# (Automatically generated.  Do not edit this section)
<IfModule mod_rewrite.c>
    RewriteEngine On

    RewriteBase /

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d [OR]
    RewriteCond %{REQUEST_FILENAME} gallery\_remote2\.php
    RewriteCond %{REQUEST_URI} !/index\.php$
    RewriteRule .   -   [L]

Various drupal hacks

Don't you hate it when you hack something or pour over a problem, only to forget later how you did it ? This is a dump of various hacks that's open to indexing by the search engines, perhaps something can be of value to others messing with drupal core code (faux pas), css, modules, layout or whatever.
teaserpic: 

How to setup drupal calendar irregular date repeats

To set up a calendar repeat of a date that isnt a numerical date, i.e. Thanksgiving is the 4th Thursday of every November, use the calendar modlue advanced repeat properties.

Here's a screen print of the details to make it work, notice that I chose every 12 months. If you choose every year the content is not passed to the calendar.

drupal-cal-repeat

teaserpic: 

drupal calendar date offset filter bug

http://drupal.org/node/396016#comment-2234582
teaserpic: 

avi to flv using ffmpeg

Got ffmpeg ?
ffmpeg -y -i files/input_file.avi -ar 22050 -f flv files/output_file.flv
problems ?
FFmpeg version SVN-r10964, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-libmp3lame --enable-shared --prefix=/usr --enable-libogg --enable-libvorbis
libavutil version: 49.5.0
libavcodec version: 51.48.0
libavformat version: 51.18.0
built on Nov 8 2007 14:12:36, gcc: 4.1.1 20061011 (Red Hat 4.1.1-30)
Input #0, avi, from 'files/3635634.avi':

How to push sedans

So, yer out of gas and have to push huh ?

All kidding aside, here' s how I push drupal and gallery2 from dev to a production host.

localhost
dump drupal DB with backup_migrate module
### location: /var/www/"websitedirectory"/drupal/sites/default/files/backup_migrate/manual
export gallery2 DB w phpmyadmin
### note: backup function in gallery2 produced an xml dump that phpmyadmin import didn't like

Syndicate content
James Horvath Gooey Website