Code Snippets |
Well, I like databases and thought why don't make a small relational database based on flat files and do joining them using Linux/Unix shell. I tried to invent this small example:
1. Have 2 flat text files, one for Employees (emp.tbl) and the other for Departments (dept.tbl), like the following: emp.tbl content: emp_id emp_name dept_id 1 Rami 1 2 Emad 1 3 Mary 2 4 Hassan 1 5 Rasha 2 |
|||
إختار حجم الصورة التى تريد وضعها فيما يلى وإنسخ الـHTML code إلى نموذج موقعك (Template) فى المكان اللى إنت عايزه: <a href="http://egyptnow.blogspot.com/" target="_blank"><img src="http://img463.imageshack.us/img463/3382/mm21xc.jpg" alt="Call for Peace & Openness" /></a> |
|||
I needed to make a block in drupal that contain my recent posts and so, I write this code snippet. <?php
// Get all node IDs and it title from the "node" tableEnjoy :) Another trick: Display a list of node titles from a specific category |
|||
Very helpful function to convert date/time string to Unix timestamp. I needed this function to update the timestamp field of some comments in my Drupal after migrating them from my blog on blogspot. |
|||
If you need to get data in your MySQL database and display them on your dynamic PHP page.
In this example we will select everything in our table "example" and put it into a nicely formatted HTML table. |
|||
The Desktop Korn Shell (dtksh) is a standard part of the Common Desktop Environment (CDE), available on commercial Unix systems such as Solaris, HP-UX, and AIX. It is based on a somewhat older version of ksh93. It's a full Korn shell that has extensions for graphical user interface (GUI) programming in the X Window System environment. It is typically found in /usr/dt/bin/dtksh.
There are various GUI development tools that allow you to construct user interfaces with a graphics-based editor rather than with programming language code. But such tools are typically huge, expensive, and complex. dtksh, on the other hand, is inexpensive and unbeatable for the smoothness of its integration with Unix -- it's the only such tool that you can use as your login shell! Benefits of Desktop Korn Shell:
It's really interesting to drive a GUI very fast and easy from within a shell. Here is a script that I had played with to give the flavor of dtksh code. It simply implements two buttons, one for listing files and the other to exit the GUI. |
|||


Recent comments
1 hour 20 min ago
10 hours 44 min ago
2 days 13 hours ago
2 days 18 hours ago
3 days 13 hours ago
3 days 14 hours ago
3 days 17 hours ago
1 week 4 days ago
1 week 4 days ago
1 week 4 days ago