Posts

Tips learning ReactJS

Just learned ReactJS, and yes! it is great for frontend dev Tips for learning ReactJS: Forget your knowledge about jquery, really Use create-react-app to setup  https://create-react-app.dev/   Every part of website is component, for example <div> <span> <p> is components Reuse existing components, search react-* in https://www.npmjs.com/ Think about updating values in this.state then your website will change automatically

Perpanjang STNK di artha gading

Lokasi di mal artha gading lantai 3 lobby italy Datang maksimum jam 11 jika tidak ingin kepotong istirahat jam 12-13 Foto kopi bisa di kantor pos di lantai dasar dekat atm bca / optik tunggal, wajib bawa fotocopy Tarik napas panjang2 dan siapkan tenaga ekstra karena antriannya panjang, butuh perjuangan Siapin bpkb asli dan foto kopinya Stnk asli dan foto kopinya Ktp asli dan foto kopinya Bawa pulpen  Bawa uang cash Ambil formulir: langsung masuk lewati antrian ke sebelah kanan loket, minta formulir pendaftaran Isi formulir sesuaikan dgn bpkb Serahkan berkas: masuk dan antri di antrian pendaftaran (bpkb asli akan dikembalikan) Tunggu di dalam ruangan sampai nama dipanggil Terima kertas biru kewajiban bayar pajak disitu tertera berapa rupiah, dan ktp asli akan dikembalikan Ambil uang cash jika belum Pembayaran pajak: masuk dan antri lagi di antrian pembayaran Setelah bayar tunggu di dalam ruangan sampai nama dipanggil Terima stnk baru, periksa nama no kendaraan dsb ...

Learning the Machine Learning :(|)

I'm trying to solve captcha using machine learning. The result is amazing, near 100% captcha solved with just small model, compared to previous method: brute force You will need a lot captcha samples Find out each letter boundaries, x y width and height Width and height must be equal for all letters Crop each letter from samples (1) to new files I use about 30 files for each letter Using convert -crop Create new folders named possible letters/numbers and use your brain to move cropped files (3) to correct folder I only move "clean" letter Now train model! Finally you can solve captcha, letter by letter (use model.predict) Letter's boundaries is important here, for some captcha you have to make adjustment for different letters and positions Good luck Ref: https://medium.com/@ageitgey/how-to-break-a-captcha-system-in-15-minutes-with-machine-learning-dbebb035a710

Run non steam windows game under Linux

For example I want to run caesar 3 windows game.. Create this script in Caesar 3 folder, named c3.sh $ vi c3.sh #!/bin/bash SCRIPT=`realpath $0` SCRIPTPATH=`dirname $SCRIPT` export STEAM_COMPAT_DATA_PATH="$SCRIPTPATH/compatdata" mkdir $STEAM_COMPAT_DATA_PATH # change this to your proton binary, for example: $HOME/.local/share/Steam/steamapps/common/Proton 3.16/proton PROTON="/path/steamlibrary/Steam/SteamApps/common/Proton 3.16/proton" # change c3.exe to your game executable EXE="c3.exe" "$PROTON" run "$SCRIPTPATH/$EXE" killall -r "$EXE" $ chmod +x c3.sh Run Steam, open menu Games -> Add Non Steam Game -> Browse... and choose c3.sh Click Play to run! 😼

Smooth Sweet Home 3D in Linux

Add  flag: sun.java2d.opengl=true to launch script: # vi SweetHome3D-Java3D-1_5_2 ... exec "$PROGRAM_DIR"/jre8/bin/java -Xmx2g -Dsun.java2d.opengl=true -classpath "$PROGRAM_DIR"/lib/SweetHome3D.jar:"$PROGRAM_DIR"/lib/Furniture.jar:"$PROGRAM_DIR"/lib/Textures.jar:"$PROGRAM_DIR"/lib/Examples.jar:"$PROGRAM_DIR"/lib/Help.jar:"$PROGRAM_DIR"/lib/batik-svgpathparser-1.7.jar:"$PROGRAM_DIR"/lib/jeksparser-calculator.jar:"$PROGRAM_DIR"/lib/iText-2.1.7.jar:"$PROGRAM_DIR"/lib/freehep-vectorgraphics-svg-2.1.1b.jar:"$PROGRAM_DIR"/lib/sunflow-0.07.3i.jar:"$PROGRAM_DIR"/lib/jmf.jar:"$PROGRAM_DIR"/lib/j3dcore.jar:"$PROGRAM_DIR"/lib/j3dutils.jar:"$PROGRAM_DIR"/lib/vecmath.jar:"$PROGRAM_DIR"/jre8/lib/javaws.jar -Djava.library.path="$PROGRAM_DIR"/lib -Dcom.eteks.sweethome3d.applicationId=SweetHome3D#Installer com.eteks.sweethome3d.S...

Clean up Unix Trojan.DDoS_XOR-1, Chinese Chicken Multiplatform DoS botnets Trojan

So you have identified your server is infected with this Trojan Using top you can find random proces name Killing it will spawn another new random proces There is nothing you can do.. just restore your server from backup Or reinstall your server Just kidding... You can clean this trojan because this one is non destructive Ok let's go! First you have to find the pid of random process using top You cannot use ps because it renamed the process name Then you have to freeze those processes, do not kill it because it will spawn another random process Use kill -STOP pid [pid] [pid] it will freeze those processes Next we do cleaning up the trojan from file system Truncate /lib/libudev.so /lib/libudev.so.6 So it contains nothing, because the trojan copy from this file to random name Make it immutable (chattr +i) Next edit /etc/crontab  find lines contains gcc and remove it Check crontab -e , and all files in /var/spool/cron/ Go to /etc/cron.d , /etc/c...

Update lenovo/thinkpad BIOS using USB Flash

Download firmware in .iso format (BIOS bootable update CD) dnf install geteltorito geteltorito -o bios.img j5uj62wd.iso Plug USB flash, umount manually if mounted, find out the device name (dmesg) Write bios.img to usb flash disk, be careful about device name, for example /dev/sdb, all data in USB flash will be deleted dd if=bios.img of=/dev/sdb bs=1M Boot and enter Setup, make sure system can boot in Legacy mode UEFI / Legacy = both Priority = Legacy First CSM = yes Save and boot using USB flash Ref: https://workaround.org/article/updating-the-bios-on-lenovo-laptops-from-linux-using-a-usb-flash-stick/

Update grub config and update initramfs in Fedora

Tune grub config in: /etc/default/grub and /etc/grub.d/* Update grub config: grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg To update initramfs run: dracut -fv

Theme for Thunderbird mail client

Cool theme for  Thunderbird mail client: Monterail Full Dark 1.1.2 by conema Monterail Full Dark, a Thunderbird theme inspired by the mockup of Monterail To install, search Add On from Thunderbird mail or visit: https://addons.thunderbird.net/en-US/thunderbird/addon/monterail-fulldark

Another good gnome theme (Fedora)

Use this combination: Adapta Papirus icon Roboto fonts To install theme, i'm using Fedora 28: $ dnf install adapta-gtk-theme Install icon: $ dnf copr enable dirkdavidis/papirus-icon-theme $ dnf install papirus-icon-theme Change settings using Tweaks: Change fonts: My desktop: