What should be your first programming language?

If you are new to programming or want to step into learning programming, I am sure that you are in a dilemma of choosing your first programming language. Well, stop thinking and start with Python.   How to start for now?   Read this article first. Try to understand what he is saying, don’t skip … Continue reading What should be your first programming language?

উত্তরা বিআরটিএ থেকে মোটরসাইকেলের রেজিস্ট্রেশন অ্যাকনলেজমেন্ট স্লিপের ডেট বাড়ানো, ডিজিটাল নাম্বার প্লেট তোলা, ফিংগার প্রিন্ট দেয়া এবং স্মার্ট কার্ড তোলার ডিটেইলস

উত্তরা বিআরটিএ থেকে মোটরসাইকেলের রেজিস্ট্রেশন অ্যাকনলেজমেন্ট স্লিপের ডেট বাড়ানো, ডিজিটাল নাম্বার প্লেট তোলা, ফিংগার প্রিন্ট দেয়া এবং স্মার্ট কার্ড তোলার ডিটেইলস ১. রেজিস্ট্রেশন অ্যাকনলেজমেন্ট স্লিপের ডেট বাড়াতে হলে: স্লিপ নিয়ে সোজা চলে যান ১০৩ নম্বর রুমে, সেখানে কম্পিউটার নিয়ে বসে থাকা লোকটিকে কাগজপত্র দিন এবং বলুন যে আপনি স্লিপের ডেট বাড়াতে চান। তিনি আপনার কাগজের … Continue reading উত্তরা বিআরটিএ থেকে মোটরসাইকেলের রেজিস্ট্রেশন অ্যাকনলেজমেন্ট স্লিপের ডেট বাড়ানো, ডিজিটাল নাম্বার প্লেট তোলা, ফিংগার প্রিন্ট দেয়া এবং স্মার্ট কার্ড তোলার ডিটেইলস

How to enqueue javascript files properly in the WordPress admin panel

You’d probably have answered the question already, won’t you? We all know that the correct answer is to do that we have to write a function that hooks the “admin_enqueue_scripts” and inside that function we will have to load the script via wp_enqueue_scripts() function. That’s the correct answer, but when it comes to the best … Continue reading How to enqueue javascript files properly in the WordPress admin panel

Remote deploy your project using git’s server side hooks

Git hooks are very useful to perform tasks during different states of the codebase. Sometime you can cancel your commit if jshint throws some error on your javascript files, or you can deploy your current working directory somewhere in the server. In this article we will be discussing how to deploy code using git’s server … Continue reading Remote deploy your project using git’s server side hooks

Automated Rsync – without compromising security

Rsync is one of the most popular tools to synchronize data between two computers, and used mostly in taking backups using this sync feature. It’s easy to use and only uploads the changed files when a sync is necessary, so it’s effective in saving bandwidth and time too. To run rsync, you need root or a properly privileged user which can access that specific path in the remote machine. And to setup this privilege, you can either use a should-never-be-used root account or an user chrooted using a jail shell. But if, by any chance, current machine is compromised then remote machine is compromised too. Because anyone can connect to your remote machine using those credentials from the current machine. To avoid plain text credentials (or the credentials written in a shell script), people usually use ssh keys to establish a connection between two machines. Still, your remote machine is unsecured if anything goes wrong in the current machine from where you’re taking the backup.

So a fullproof solution is to use ssh keys and properly chroot the remote user so that it can only access the backup files and nothing else. However, setting up a jailed shell is a not-for-everyone type task and takes time and experience to accomplish properly. So here is a quick work around that you can implement in your remote machine to prevent the connecting user from doing anything malicious but only tasks those are needed to perform the rsync backup. Let’s see how we can do that

Before continuing, let’s name our two machines. The one which should be backed up, lets name that Workstation. And the one which is storing the backups is BackupServer. Also for now, let’s assume that you are backing up complete “/var/www” folder in the WorkStation.

Step 1: Create SSH key in the BackupServer
Log into the BackupServer and run the following command in ssh terminal. But remember, if you already have a key in ~/.ssh/id_rsa.pub then IGNORE IGNORE IGNORE this step.

ssh-keygen -t rsa

It will prompt for a passphrase, REMEMBER to just hit the enter without typing anything.

Step 2: Display and Copy the SSH key from BackupServer
Run the following command to display the ssh public key in the terminal, and then copy it.
Continue reading “Automated Rsync – without compromising security”

এসো নিজে করি – এঞ্জিনএক্সের সাথে পিএইচপি এফপিএম ফাস্টসিজিআই মডিউল ইন্টিগ্রেশন

আমরা এর আগের পর্বে দেখেছিলাম কিভাবে এঞ্জিনএক্স ইনস্টল, আপগ্রেড এবং কনফিগার করতে হয়, এবং কিভাবে স্ট্যাটিক ফাইল সার্ভ করতে হয়। এই পর্বে আমরা আলোচনা করবো কিভাবে আমরা এঞ্জিনএক্সের মাধ্যমে পিএইচপি ফাইল সার্ভ করতে হয়। গত পর্বের শেষে আমাদের ডিফল্ট সার্ভার ব্লক ফাইলটি (/etc/nginx/sites-available/default) দেখতে ছিল নিচের মত। আমরা আজকেও এই ফাইলটি নিয়ে কাজ করব। গত … Continue reading এসো নিজে করি – এঞ্জিনএক্সের সাথে পিএইচপি এফপিএম ফাস্টসিজিআই মডিউল ইন্টিগ্রেশন

এসো নিজে করি – ডেবিয়ানে এঞ্জিনএক্স ইনস্টলেশন এবং কনফিগারেশন

Nginx বা এঞ্জিনএক্স হল রাশিয়ান ডেভেলপার ইগর ভ্লাদিমির সিসোয়েভের তৈরী করা একটি লাইটওয়েট ওয়েব সার্ভার। স্ট্যাটিক ফাইল সার্ভ করার ক্ষেত্রে অসাধারণ পারফর্ম্যান্সের কারনে এঞ্জিনএক্স বিশ্বব্যাপী ব্যাপক জনপ্রিয়। এছাড়া ফাস্টসিজিআই ব্যবহার করে এঞ্জিনএক্স কে যেকোন সার্ভার সাইড ল্যাঙ্গুয়েজের সাথে ব্যবহার করা যায়। এই আর্টিকেলে আমরা দেখব কিভাবে ডেবিয়ান অপারেটিং সিস্টেমে আমরা এঞ্জিনএক্স ইনস্টল এবং কনফিগার করতে পারি। পরবর্তী আর্টিকেলে আমরা ফাস্টসিজিআই প্রটোকলের সাহায্যে এঞ্জিনএক্সের মাধ্যমে পিএইচপি ফাইল সার্ভ করা শিখব 🙂

এঞ্জিনএক্স ইনস্টল করা

প্রথমেই যেটা করতে হবে সেটা হল এপিটি প্যাকেজ ম্যানেজার লেটেস্ট রিপো ইনফরমেশন দিয়ে আপডেট করা। এটা আমরা কমবেশী সবাই জানি কিভাবে করতে হয়। আপনার সার্ভারের টার্মিনালে নিচের কমান্ড দিন। আপনি রুট ইউজার হিসেবে লগইন না করলে না করলে এবং সুডুয়ার্স লিস্টে আপনার ইউজার অ্যাড করা থাকলে কমান্ডের আগে sudo ব্যবহার করতে হবে 🙂

apt-get update

এবার আমরা নিচের কমান্ড দিয়ে এঞ্জিনএক্স ইনস্টল করব। কমান্ড দেয়ার কিছুক্ষনের মাঝেই দেখতে পাবেন এঞ্জিনএক্স ইনস্টল হয়ে গেছে

apt-get install nginx

ইনস্টল হয়ে গেলে চলুন এঞ্জিনএক্স কে স্টার্ট করি নিচের কমান্ড দিয়ে। যদি এঞ্জিনএক্স চালু হতে ব্যর্থ হয়, বা আগে থেকে অ্যাপাচি সার্ভার চালু থাকে তবে আগে অ্যাপাচিকে অফ করে নিন
Continue reading “এসো নিজে করি – ডেবিয়ানে এঞ্জিনএক্স ইনস্টলেশন এবং কনফিগারেশন”

Breakpoint JS – load external javascript for different browser breakpoints

Live Demo: http://hasinhayder.github.io/BreakPoint/ Breakpoint helps you to define multiple breakpoint ranges and load external javascript files when someone resize their browser window to those breakpoints. Beside loading external scripts, Breakpoint also triggers an event whenever browser width falls in any of those predefined breakpoint ranges. Using Breakpoint Using BreakPoint is pretty simple. Include jQuery in … Continue reading Breakpoint JS – load external javascript for different browser breakpoints