Skip to main content

Posts

Showing posts from 2014

Easiest Way to install Polymer

I already tried bower.

If you prefer bower to install polymer for your mobile development, you can proceed this reference:
http://blog.nraboy.com/2014/07/use-polymer-apache-cordova/https://github.com/infomofo/cordova-polymer-template
Here i prefer accomplish this using bash.
https://www.polymer-project.org/resources/tooling-strategy.html#clone

You need setup your public key for your github account.
https://help.github.com/articles/generating-ssh-keys/

I don't know why am i suggests you to choose the bash instead of the bower. What i know here is bower is JS base. May be the JS easy to crash.

Thats all from me.

Export Update base on Commits

Hai, day to day i keep searching about it. This solution i found is not best as what we or i need but i better than nothing.

What the code above doing is compile files from latest commit to your selected commit into a zip.

Grab the cobe from Github
https://gist.github.com/ihsanberahim/eef236a3be9abf52329e

Unity3D accessing Js from C# and vice versa

Unity3D accessing Js from C# and vice versa
GUIDES: Add both the Js and the C# script to a same GameObject


GITHUB https://gist.github.com/ihsanberahim/5873e07e91e96d72861c/edit

Wordpress Highlights #1

1# Wordpress To Dropboxhttp://wordpress.org/plugins/wordpress-backup-to-dropbox/screenshots/

Dunia 'cloud' kini berkhidmat untuk kita backup laman sesawang kita secara atas talian selain dari pada menyimpannya dalam simpanan fizikal.
2# Ghost Integration for Wordpress https://wordpress.org/plugins/gust/screenshots/ https://wordpress.org/plugins/ghost/
Pengguna umum tidak sepatutnya dipaksa mempelajari perkara baru dan perkara asing iaitu menulis aturcara walaupon hanya HTML dalam melaksakan kerja menulis artikel. Maka 'ghost' boleh diambil sebagai alternatif mudah untuk meraka.
3# Wordpress 3.5 Post Format UI updateshttp://www.wpbeginner.com/plugins/how-to-add-a-user-interface-for-post-formats-in-wordpress-3-5/ https://github.com/crowdfavorite/wp-post-formats
Perkembangan antara muka Wordpress ini hampir sama ideanya dengan Google+ dan Facebook di waktu pengguna 'post artikel'. 4 jenis artikel kebiasaannya dikongsi di laman sosial adalah seperti 'event', '…

Use Static instead of the Globals

Oh no. php global are now deprecated in PHP!
how to refactory my code?

So, after about half day. I found the way.

Why globals or static? 
# I need something like 'reuse' not 'requery';
# I dont want query user profile in every function i need the data.

function get_current_username()
{
//do query user profile for the username
}

function get_current_picture()
{
//do query user profile for the picture
}

# I dont want mess my function with the same argument

function get_current_username($current_user)
{
}

function get_current_picture($current_user)
{
}

So with the php globals, we can skip requery like this

global $current_user;

$current_user = get_currentUser();

function get_current_username($current_user)
{
global $current_user;
return $current_user['username'];
}

function get_current_picture($current_user)
{
global $current_user;
return $current_user['picture'];
}


but for me to implement the php static, i need to refactor my codes.

Using the static in classes…

Mobile-first web development trick to save money

Here i share the trick to save money using virtual device instead of the real devices. We can use 1 extended screen to run all emulator or simulator we need.
For Android: 1. Instal HAXM 2. Open Android > Create AVD *tablet-xhdpi/mdpi *handheld-xhdpi/mdpi

For iOS: 1. create simulator shortcut:
http://stackoverflow.com/questions/10379622/how-to-run-iphone-emulator-without-starting-xcode
That all! I glad meet this way. I don't need to buy all sort of devices. :)




Full Page Screenshot using command line

Chrome extension page screenshot by google not work for me already. So i used another one instead.

Chrome Extension Full Page Screenshot

I also found Ubuntu and Mac can do it via command line;

Mac: Webkit2png - http://mrcoles.com/full-page-screen-capture-chrome-extension/Ubuntu: wkhtmltopdf - http://www.binarytides.com/take-webpage-screenshot-from-command-line-in-ubuntu-linux/Window: ....How to install
//for mac
$ brew install webkit2png

//for ubuntu
$ sudo apt-get install wkhtmltopdf

Note: please share you you guys found for the Window one. Thanks.
Reference: Get brew for your mac here