Arash Milani: Hacker & Happiness Ninja Sun, 01 Nov 2635 00:00:00 +0330 en-us How to configure iptables for openvpn Sun, 01 Nov 2635 00:00:00 +0330 If you have installed the openvpn server and iptable is blocking the service by default then use these configurations for openvpn to function properly. Automaticly block Brute-Force Attacks reported by Directadmin / CentOs Sun, 01 Nov 2635 00:00:00 +0330 To automatically block Brute-Force Attacks reported by Directadmin we will be using some scripts by Directadmin. <br/>Be careful with this tutorial and use it at your own risk. The first commands will block your ssh access to server if you are not using the default ssh port 22. To allow your modified port number for ssh modify the iptables files accordingly. Also, this file is written for a CentOS/Fedora type system and has not been tested on Debian or FreeBSD How to install Yaz PHP on CentOs 6 Sat, 24 Oct 2635 00:00:00 +0330 YAZ is a programmers’ toolkit supporting the development of Z39.50/SRW/SRU clients and servers. We first need to install YAZ dependencies using the yum package manager. Here I've explained the steps to get it installed on your box to get the PHP codes using the YAZ package run How to configure Squid basic authentication on CentOs 6.5 Fri, 23 Oct 2635 00:00:00 +0330 In this post I will introduce the step by step configuration that allows for authenticated access to the Squid service using usernames and passwords. We are going to use "ncsa_auth" that allows Squid to read and authenticate user and password information from an NCSA httpd-style password file when using basic HTTP authentication. How to setup xdebug to work with manually compiled php 5.2.17 on ubuntu Sat, 03 May 2634 00:00:00 +0330 if you are like me and having both php 5.2 (compiled from source) and php 5.3 (installed by apt-get) on the same development machine (ubuntu 11.10) then one day you decide to install xdebug chances are you may find yourself struggling to follow instructions in xdebug documentation with no luck for hours. Here is what worked for me An alternative, safer & cleaner way to compare Types in javascript Sun, 27 Apr 2634 00:00:00 +0330 I was never happy with javascript type checking using typeof and comparing the result with a string; as a small spelling error in type name can lead into false results that do not even throw a good error. After a discussion with Afshin Mehrabani (Thank you man!) we thought we can put an end to this. So here is the initial result of that discussion How to get a WordPress post by slug Fri, 18 Apr 2634 00:00:00 +0330 I was developing a WordPress plugin using custom post types then I needed to retrieve a post by its slug. Here I'm trying to get a custom post type called "product". you can replace the post type according to your needs. generic types are "post" and "page". Fixed: GnuTLS recv error (-9): A TLS packet with unexpected length was received Wed, 11 Dec 2633 00:00:00 +0330 I was trying to call some RESTFull API functions that were over https using php and curl. There was something wrong with it that was preventing me from communicating with remote server. I was getting this error. I'm sharing a quick fix that help me to solve the issue Why does HTML Validation matter? Tue, 29 Oct 2633 00:00:00 +0330 "My web page is rendering fine in all major browsers. why should I bother validating it?" <br/>You will hear this question once in while. I'm trying to give some real answers for it in this post. <br/> <br/>I'm not concerned about being called professional as W3C guys are trying to persuade us on their FAQ. I really don't think of validation as a sign of professionalism. I'm more concerned about making our life easier as developers and designers. I think HTML validation can help us with it. After all we should spend creating awesome stuff rather than spending hours and hours debugging a bug in our HTML codes, shouldn't we? Start your STOP list today to improve performance of your team Fri, 27 Sep 2633 00:00:00 +0330 Recently on our local open software talks I was talking about "How to start software development teams and keep them up". I started my talk with describing 3 type of people that may be attending the session, and asked each person in the room to let me know which group they fall into. I told them if they are attending this session either (1) they are a freelancer that wants to start a team or join a team or (2) they are already a member of a team for few months or (3) they have been working with their team for a quite long time e.g 2 years. <br/> <br/>We discussed many things from early stages of creating a team till the being a member of mature team. and as we were continuing the talk there was a pattern in the hints beings discussed: The more mature your team gets the more you need a STOP List rather than a TO-DO List