Category: Linux

  • [visudo] Username is not in the sudoers file

    Username is not in the sudoers file. This incident will be reported Besides making sure that your username is in sudo group (I think it is), there are other cases that cause this problem. Some of them may have something to do with sudoers file (/etc/sudoers) in my case, i accidently commented out 1 important […]

  • Tùy biến Terminal bằng oh-my-zsh & powerlevel10k

    Bước 0: cài đặt zsh (tương tự bash shell) Bước 1: cài đặt oh-my-zsh Bước 2: cài đặt powerlevel10k (lưu ý là nếu bạn không biết gì thì nên bỏ qua bước 2, và chỉ làm bước 3, 4. Lý do là vì bước 4.1 sẽ cài đặt cho bạn bước 2 luôn rồi. Còn […]

  • Applied Machine Learning – things you need to know

    Một số lưu ý khi áp dụng Machine Learning để giải quyết các vấn đề cụ thể: Always use train_test_split or similar GridSearchCV (built-in cross validation) HDF need to be shrunk after write/update –> ptrepack –chunkshape=auto –propindexes –complevel=9 –complib=blosc data_in.h5 data_out.h5 Use Keras optimizer instead of tensorflow itself (so that it can be saved later […]

  • Bash: check if a zip or a rar file has password-protection

    ZIP crypted=$( 7z l -slt — $file | grep -i -c “Encrypted = +” ) if [ “$crypted” -eq “1” ]; then protected=1 fi RAR unrar x -p- -y -o+ “$file” 1> /dev/null 2> /dev/null if [ “$?” -eq “3” ] ; then unrar x -p$password -y -o+ “$file” 1> /dev/null 2> /dev/null fi Source: […]

  • Linux Tips

    bash (zsh too) tricks from tutorialLinux sudo !!: re-run previous command in sudo prepended ctrl-k ctrl-u ctrl-w ctrl-y cutting/pasting text less +F /  less then shift-f instead of tail ctrl-x-e to continue editting shell in a text editor alt-. to paste previous command’s argument reset to reset/unbork your terminal ctrl-a. ctrl-e to move to the […]

  • Koding : coding in the Cloud [just calm down and move on, it’s gonna save your time later, trust me] This one is new to me so I’m going to have a brief introduction here, hopefully it’s worth your time reading this : 1. The first thing is an active support from the Community & Administrators : My question was answered […]

  • Hadoop 2.2 Single Node Installation on CentOS 6.5

    By far the best tutorial for you to get started with Hadoop installation. Source : Introduction This HOWTO covers Hadoop 2.2 installation with CentOS 6.5. My series of tutorials are meant just as that – tutorials. The intent is to allow the user to gain familiarity with the application and should not be construed […]

  • A little bit of Python, FTP and CentOS

    Today I will approach the system using few lines of Python code : – Python code : FTP client – CentOS server :  FTP server Let’s get started ! FTP uses 2 port : 21 and (sometimes) 20 if the server is in active mode – or a random port (we’ll see them in this […]

  • Python setup tools easy_install Linux

    Let’s not use easy_install anyway: Cai dat easy_install cho linux, unix : I ran into a bit of trouble installing easy_install, after reading many useless articles, this is how I solved the problem,  actually it’s rather simple : Type : wget && python and you’re done .   Bonus : to […]

  • Install Backtrack 5 startx black screen hang up

    Cài đặt Backtrack 5, bị treo sau khi “startx” I encountered this problem whilst I was installing Backtrack 5 R3 using USB (multiboot) Well, I did google it and really found some helps, but after all I had to fix it myself If you have googled and try this but not sucess : Edit the […]