July 30, 2016
اين تذهب في سيدني استراليا
دار أوبرا سيدني Sydney Opera House
اهم معلم في مدينة سيدني، تحفة معمارية غريبة ومميزة، المبنى مكون من مبنيين على شكل ٣ اصداف متداخلة.
خذ جولة داخل المبنى، واذا حالفك الحظ سيمكنك متابعة بعض المتدربين يعزفون مقطوعة موسيقية.
July 30, 2016
اين تذهب في جولد كوست استراليا
سرفرز باردايس Surfers Paradise
سرفرز باراديس (جنة المتزلجين على الماء) هي المنطقة الترفيهية الرئيسية في جولد كوست، مجموعة كبيرة من المطاعم والفنادق والمحال بمختلف انواعها من الفخمة الى محلات التذكارات، محلات الالعاب والترفية والمأكولات الشعبية.
في الواجهة البحرية يتحول الشارع في مساء ايام السبت والجمعة والاحد الى سوق مؤقت مليئ بالاكشاك التي تبيع مختلف البضائع الغريبة، وتمتليئ بمحلات الحيوانات الغريبة التي يمكن ان تلاعبها وتصور معها.
من الاماكن التي تصلح للصغار:
– Timezone Surfers Paradise
– Ripley’s Believe It or Not!
– Infinity Attraction
May 29, 2016
Change and rebuild an RPM on CentOS
Test
sudo yum groupinstall "Development Tools"
sudo yum install epel-release.noarch
sudo yum install yum-utils rpmdevtools
mkdir -p ~/rpmbuild/{SOURCES,SPECS}
wget http://example.com/lame-3.99.5.tar.gz
mv lame-3.99.5.tar.gz ~/rpmbuild/SOURCES
rpmdev-newspec lame
mv lame.spec ~/rpmbuild/SPECS
cat < < EOF > ~/rpmbuild/SPECS/lame.spec
# ------------------------------------------------------------
Name: lame
Version: 3.99.5
Release: 1%{?dist}
Summary: LAME MP3 Encoder
License: N/A
Source0: lame-3.99.5.tar.gz
%description
Educational tool to be used for learning about MP3 encoding. LAME aims to be the basis of a patent free audio compression codec.
read more
February 17, 2016
Limit String Length in Printf in C
I can’t believe how many times I forget this trick! so I am writing it down so I won’t forget it!
Normally when you use printf function with “%s” formatting to print a string (char *) you rely on C convention of terminating a string with a NULL character (i.e. value 0).
So if you want to print small part of longer string, you copy the part you need to a new buffer and terminate it will NULL.
read more
January 31, 2016
Django: How to pass an url as parameter of include
In Django web applications I usually have a single template file for navigation or bread crumb that I include from other template files, it is easy and straight forward to pass parameter to the included template file, some thing like:
{% include "nav.html" with title="title" object=my_object %} But it would be a little tricker to send a URL as a parameter, i.e. you can’t write it:
{# WRONG DOESN'T WORK #} {% include "nav.
read more
January 25, 2016
Django CRUD Parent/Child Edition
I’ve written before about implementing CRUD operations on a single table in Django, and the post was very popular on my blog and I hope many people learned something from it.
The next logical step is to write a CRUD application with Parent/Child relationship, the application is bit more verbose but it follow the same simple logic used in the first post.
In fact I didn’t write a single application, I wrote five stand alone applications that shows different ways to implement CRUD operations:
read more
August 30, 2015
اقتراحات لتفعيل خدمة لاسلكي الهواة
كتبت رسالة الى معالي الدكتور محمد السويل وزير الاتصالات باقتراحات لتفعيل خدمة لاسلكي الهواة او ما يعرف بـ “Amature Radio” او “Ham Radio” ردا على طلبه للعموم باقتراحات لتطوير خدمة الاتصالات في المملكة:
https://twitter.com/MIsuwaiel/status/580704446520291328
وفي ما يلي نصها، للتاريخ وكذلك كمرجع لي.
السلام عليكم ورحمة الله،
معالي الدكتور محمد السويل اكتب لكم بمقترحات لتشجيع خدمة لاسلكي الهواة في المملكة العربية السعودية.
قبل قرابة السنتين احببت ان اتعلم تقنيات اللاسلكي ولاسلكي الهواة لاكتشف عدة عوائق لاستخدام الخدمة في المملكة.
read more
June 14, 2015
My first public Python Package “pyagentx”
I’ve just published my first public Python package “pyagentx”, the package will help you build “AgentX” agents to extend a master SNMP agent.
Let’s assume that you want to monitor your custom application from your Network Managment System (NMS), but the NMS only speak SNMP, this package allows you to extend the master SNMP agent to include your custom application metrics.
Project page on Github
Package page on Python Package Index
read more
April 19, 2015
Django Image and File Field Caveats
Every time I work with Image or File fields in Django I forget some tiny detail that waste 10-20 minutes until I remember what was I missing, I always say I will remember it next time but I never do! so I made a list of common errors I keep doing while working with Image/File fields:
For complete working project: (https://github.com/rayed/dj-imagefield-example)
Setting MEDIA_URL and MEDIA_ROOT Make sure you set proper values for MEDIA_URL and MEDIA_ROOT in your settings.
read more
January 22, 2015
Intro to Ansible Presentation
My presentation at Riyadh Linux User Group about Ansible
read more