Showing posts from 2016

protect postfix from outside

iptables -A INPUT -p tcp -s --dport 25 -j ACCEPT iptables -A INPUT -p tcp --dport 25 -j DROP

some study

I decided to study in hackerrank these days. just for practice and think more. for this question java 7 solution import*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static void main(String[] args) { Scanner in = new Scanner(; int n = in.nextInt(); for (int i = 1; i <n+1 ; i++) { String s = new String(new char[n-i]).replace('\0', ' '); s += new String(new char[n-s.length()]).replace('\0', '#'); System.out.println(s); } } }  at least there is not two for loop :)

google city are searches

I did not know this feature of google. I used to live in istanbul now in wroclaw. and I was wondering how small this city is. and search wroclow city are in google 5343 km square is huge. population and traffic huge too. but I am happy with my small wroclaw :)

linux mint xiaomi redmi 3 pro upgrade to MIUI 8

I bought this phone around 3 months ago. first I had a lot of problems about menu and applications. some chinese some english. some utf problems in applications. anyway I was reading this miui 8 update then I decided to upgrade mine too. but I am a new in this flashing rom or any adb commands.  first I downloaded recovery image then put the image in phone try to update from updater app inside phone it did not work. then I tried to use TWRP and fastboot method. I had problems about giving root access to twrp. then tried to use miflash but my machine is linux mint. so it did not work too. I tried every online tutorial and could not upgrade my phone. at last I was reading shell scripts in fastboot package flash_all_lock.bat actually I was not sure about these commands fastboot $* getvar product 2>&1 | grep "^product: ido" if [ $? -ne 0 ] ; then echo "Missmatching image and device"; exi