Debinaize It

September 12, 2008

Simple AppleScript

Filed under: Uncategorized — Tags: — zaher14 @ 10:57 am

I wanted to run iSync Priodically everyday so that my mobile and MacBook get synced regularly, this is what I came up with:

tell application “System Events” to set isync_running to (name of processes) contains “iSync”


tell application "iSync"
activate
if isync_running is not true then
tell application "System Events" to set visible of process "iSync" to false
end if
synchronize

repeat until syncing is false
delay 1
end repeat

if sync status is 2 then
if isync_running is false then
quit
end if
else
activate
end if
end tell


save the file with a .scpt extension and add the script in iCal to run every day.

June 7, 2007

Creating Ubuntu Addon CD

Filed under: Uncategorized — Tags: — zaher14 @ 1:12 pm

I, along with my friend salahuddin had been trying to make an addon cd for our Favourite Ubuntu 7.04 Feisty Fawn for those who does not have any internet connection. Salahuddin mainly worked on the package selection and dependency solving while I worked on writing a easy to use script to make the cd-making process easier. After some days hard work we were able to make one. Here is the whole procedure of making an addon cd that is compatible with the official ubuntu cd:

1. First download the packages with dependencies in your hard drive. One way to do this is using apt-get with -dy switch. For example you want to add eclipse in the addon cd. Then

$sudo apt-get install -dy eclipse eclipse-cdt
$sudo apt-get autoclean

By default these files are stored in /var/cache/apt/archives.

2. Now execute this script

*******************************************************************************
#!/bin/sh

mkdir -p addon-ubuntu/dists/fiesty
cd addon-ubuntu/dists
ln -s fiesty/ stable
ln -s fiesty/ unstable
cd ..
mkdir pool
cp `find /var/cache/apt/archives/ | grep deb | grep -v /partial/` pool

dpkg-scanpackages pool /dev/null | gzip -9c > dists/fiesty/Packages.gz
gunzip -c dists/fiesty/Packages.gz > dists/fiesty/Packages
dpkg-scansources pool /dev/null | gzip -9c > dists/fiesty/Sources.gz
gunzip -c dists/fiesty/Sources.gz > dists/fiesty/Sources

echo “Origin: Ubuntu\nLabel: Ubuntu\nSuite: feisty\nVersion: 7.04\nCodename: feisty\nDate: `date -R`\nArchitectures: i386\nComponents: main restricted\nDescription: Ubuntu Feisty 7.04″ > dists/fiesty/Release

apt-ftparchive release dists/fiesty >> dists/fiesty/Release
mkdir .disk

echo “Ubuntu 7.04 “Feisty Fawn” – Release i386 (`date +%Y%m%d`)” > .disk/info

cd ..
genisoimage -o ubuntu-addon.iso -r addon-ubuntu
#end of script
********************************************************************************

3. Now burn the ubuntu-addon.iso into a blank CD/DVD

4. Put the newly burned CD/DVD into the desired PC’s CD/DVD drive. Open Synaptic Package Manager. There from the Edit menu selec Add CD rom and Press OK.

Now you can install all the new packages from the CD/DVD you just created. No need to download them from the net!

Theme: Silver is the New Black. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.