Websites | Photography | Video Editing | 3D Animations

From the Blog

Apr
27
Posted by pcostan at 10:34 am

Hi guys, If you want to use nice funky, stylish fonts on your web sites… then I would recommend to use ‘Typekit’. Typekit gives you a library of fonts to select from. Click here to sign up. To sign up you will need an Adobe ID account.

Apr
24
Posted by pcostan at 10:25 am

To check what has been modified, changed or added

# git status

Pull files down from repo

# git pull

To push file to repo

# git push origin master

Add new files

# git add

Delete files

# git rm -rf (path to folder)

How to implement LESS on to your Drupal sites with Omega theme (Responsive HTML5 Base Theme)

1) First of a will need to download and upload/install the following theme, modules and libraries. In these order:

Omega – Responsive HTML5 Base Theme
These files will need to be dropped in: ‘\sites\all\themes’

Omega tool
These files will need to be dropped in: ‘\sites\all\modules’

Chaos tool suite (ctools)
These files will need to be dropped in: ‘\sites\all\modules’

Libraries API
These files will need to be dropped in: ‘\sites\all\modules’

lessphp
These files will need to be dropped in: ‘\sites\all\libraries’

LESS CSS Preprocessor
These files will need to be dropped in: ‘\sites\all\modules’

2) Under Modules enable all of the above modules

3) Next create an Omega subtheme Click here to find out how of here

4) You should now see your new theme located here ‘\sites\all\themes\YOUR-NEW-THEME\’.
Within your new theme you should see a folder called ‘CSS’. In this folder you will create a file called ‘global.less’.

5) For your new theme to pick up your new less file, you need to go back to ‘Appearance’(admin/appearance/settings/your_new_theme) and click on ‘setting’ of your new theme. On the left hand nav click on Toggle styles. you should see all css used bout you should also see your new ‘global.less’ file. Make sure you tick this box to enable new style sheet.

 

 

 

 

 

 

 

6) Finally, to see your changes on the fly, you need to enable ‘LESS developer mode. To do this go to: ‘admin/config/development/less’

 

 

 

 

 

 

 

Click here to find out more about LESS

Apr
03

To increase ‘max_allowed_packet’.

I came across this issue when trying to import 1.6gb sql dump. It took me a couple of hours to figure this out. So here is how I did it…

Go and edit this file:
# nano /etc/my.cnf

[mysqld]
datadir=/var/lib/mysql
max_allowed_packet=64M <----- Add this line to 16m, 64m, 128, or 256m
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1

# Disabling symbolic-links is recommended to prevent assorted security risks;
# to do so, uncomment this line:
# symbolic-links=0

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

After you will need to do mysql restart, then check status by typing in the following command

# mysql service status

You should see below of succesful:

max_allowed_packet | 67108864

Jan
16
Posted by pcostan at 11:58 am

Command line as follow:

/etc/init.d/httpd  restart

/etc/init.d/mysqld restart

Or

serice httpd restart

serice mysqld restart

————————————–

Import Database dumps

1) mysql -u root -p -h localhost

2) mysql> create database foo;

3) mysql> exit;

4) mysql -u root -p -h localhost foo < testing_db.sql

————————————–

Adding site to your virtual host:

/etc/httpd/conf.d/filename.conf

————————————–

To view logs go to:

# cd /etc/httpd/logs
# tail -f test_error_log

Jan
12
Posted by pcostan at 11:37 am

# ab -n 100 -c 10 http://www.yourwebsite.com/index.php

————————————–

Benchmarking www.yourwebsite.com (be patient)…..done
Server Software: Apache/2.2.17
Server Hostname: www.yourwebsite.com
Server Port: 80

Document Path: /index.php
Document Length: 0 bytes

Concurrency Level: 10
Time taken for tests: 149.230631 seconds
Complete requests: 100
Failed requests: 0
Write errors: 0
Non-2xx responses: 100
Total transferred: 51800 bytes
HTML transferred: 0 bytes
Requests per second: 0.67 [#/sec] (mean)
Time per request: 14923.063 [ms] (mean)
Time per request: 1492.306 [ms] (mean, across all concurrent requests)
Transfer rate: 0.34 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 114 3630 2779.9 2805 9515
Processing: 3340 10416 3989.7 10051 26970
Waiting: 3336 10161 3530.4 10050 26966
Total: 3872 14047 4661.0 13495 32027

Percentage of the requests served within a certain time (ms)
50% 13495
66% 15568
75% 16474
80% 17911
90% 20448
95% 23026
98% 24990
99% 32027
100% 32027 (longest request)

Recently my contract with O2 had expired. I did a lot of research and phoning around for best deals and T-Mobile gave me an offer I could not refuse. I do love my iPhone but I thought to try out Android. And why not I’m open minded as I’m a web developer. I know there are a lot of people out there who are anti-Apple or anti-Android. But I do believe that everyone should try them all. before making judgment. I had it all… Nokia, Blackberry, IOS, Android etc. And I do like Apple simplicity and I believe Android are catching up.

… Anyways back on track…

I had cancelled my contract with O2 and received my shiny new Samsung Galaxy S2 with T-Mobile. Now my iPhone was redundant and I thought to Jailbreak it as I thought this was only way to unlock the device. I did the jailbreak but there was no app to unlock the phone as  the baseband was up-to-date and no one has written a patch as yet. I did more research and discovered after reading  an article somewhere, you can actually contact your network provider to release your phone. As a customer you have the rights to have your phone unlock after ending your contract; and besides the device is no longer their property so why should it be lock their network.

Here is the link found on O2 to unlock your iPhone.

https://www.o2.co.uk/apps/help/help?qid=1&q1=2&route=unlocking&case=Handset%20Unlocking%20Form

In less than a week I received a text msg saying my iPhone can now be unlocked by syncing my iPhone to iTune. So I did a ‘Restore’ as I had previous jail broken my iPhone. After the restore process, I got a pop message saying ‘Congratulations, your iPhone is now unlocked’. Something along those lines anyways.

So if you want to unlock your phone and thinking of switching network providers, you have rights to contact your network provider and ask them to unlock your phone, regardless if its an iPhone or not.

Please leave your comments, I’m interested to know your success story or not.

Dec
11

There are alot of slow motion videos on youtube which demostrates impressive quality of ‘FPS’… Some of you may not know ‘FPS’ stands for ‘Frames Per Seconds’. By standard video recorders capture 25fsp or 29fps. Any higher 600fps or 6,000fps we move to slowmotion (freezing time).

A lot of SLRs out there now can records up to 1,000fps. which can give you this effect. If you do not own a video record with the options of recording above 29fps, you can use a plugin called ‘Twixtor Pro’. Twixtor Pro is only avaliable on ‘Apple Mac – Final Cut Pro’ and ‘PC – After Effects’.

Twixtor Pro bascially gives you the power of controlling your video motion, give it a try!

Here are my experimental videos using’Twixtor Pro’ on Adobe After Effects CS5.

iPhone 4 29fps

Hi all, here is a tip how to create your own MD5 Encrypt password. There are a few MD5 Encrypt gernerators sites out there like http://www.iwebtool.com/md5
http://md5encryption.com/ and so forth…

But how secure are they? Do they capture your IP and details? And could they hack in to your sites? These are the questions you need to ask yourself.

Well, here is the safe way round to generate your own MD5 code in CentOS.

On your local CentOS machine, create a php file. For example ‘password-gen.php’.

Next Copy and paste the below code:

<?php
echo md5('Your-password-here');
?>

Finally, in your web browser visit the page. e.g ‘http://localhost:80/password-gen.php’

Ta Dah… You should your password in MD5 Encrypt.

Sep
14
Posted by pcostan at 9:01 am

This example only works for FireFox and Chromes. Sorry not for IE :(


#page-wrap {
background: rgba(255, 147, 51, 0.7);
-moz-box-shadow: 0 0 20px
black; -webkit-box-shadow: 0 0 20px black;
box-shadow: 0 0 20px black;
}