19 November 2018

Setup NPM di dalam Proxy Corporate

Sebelumnya saya pernah menulis sedikit terkait issue menggunakan Composer di dalam proxy, supaya tidak lupa saya juga ingin menuliskan bagaimana penggunaan NPM di dalam proxy.
Apa itu NPM? NPM itu adalah package manager khususnya untuk Javascript related, gampangnya mungkin seperti sebuah repository atau gudang package, library dan komponen JS yang bisa kita tambahkan dengan mudah.

Sebagai catatan, di sini saya menggunakan CNTLM untuk melewati proxy, sehingga konfigurasi NPM saya nantinya akan mengarah ke localhost cntlm yang sudah saya setup. Untuk setup nya, silahkan buka command prompt kemudian tuliskan syntax berikut:


npm config set proxy http://localhost:3128
npm config set https-proxy http://localhost:3128

jadi, next time kita melakukan command npm, otomatis akan diarahkan ke routing cntlm yang sudah kita setup sebelumnya. Apa itu cntlm? nanti lagi ya bahasanya :)

02 October 2018

Laravel Voyager Installation Problem - Requires ext-fileinfo

After installing Laravel 5.5, i'm trying to install Laravel Voyager but found this error.

C:\Bitnami\wampstack-7.1.22-0\apache2\htdocs\voyager>composer require tcg/voyager
Using version ^1.1 for tcg/voyager
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - tcg/voyager v1.1.0 requires intervention/image ^2.4 -> satisfiable by intervention/image[2.4.0, 2.4.1, 2.4.2].
    - tcg/voyager v1.1.1 requires intervention/image ^2.4 -> satisfiable by intervention/image[2.4.0, 2.4.1, 2.4.2].
    - tcg/voyager v1.1.2 requires intervention/image ^2.4 -> satisfiable by intervention/image[2.4.0, 2.4.1, 2.4.2].
    - tcg/voyager v1.1.3 requires intervention/image ^2.4 -> satisfiable by intervention/image[2.4.0, 2.4.1, 2.4.2].
    - tcg/voyager v1.1.4 requires intervention/image ^2.4 -> satisfiable by intervention/image[2.4.0, 2.4.1, 2.4.2].
    - tcg/voyager v1.1.5 requires intervention/image ^2.4 -> satisfiable by intervention/image[2.4.0, 2.4.1, 2.4.2].
    - tcg/voyager v1.1.6 requires intervention/image ^2.4 -> satisfiable by intervention/image[2.4.0, 2.4.1, 2.4.2].
    - intervention/image 2.4.2 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
    - intervention/image 2.4.1 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
    - intervention/image 2.4.0 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
    - Installation request for tcg/voyager ^1.1 -> satisfiable by tcg/voyager[v1.1.0, v1.1.1, v1.1.2, v1.1.3, v1.1.4, v1.1.5, v1.1.6].

  To enable extensions, verify that they are enabled in your .ini files:
    - C:\Bitnami\wampstack-7.1.22-0\php\php.ini
  You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

Installation failed, reverting ./composer.json to its original content.

The solution is to uncomment extension=php_fileinfo.dll in PHP.ini file.
In my development environment, it's on line #893
Restart the webserver and rerun Laravel Voyager installation.

28 September 2018

Error When Installing Laravel Passport

When you are working in a well established company, it's common that the company using multi layer security to prevent security attachk either from inside or outside organization. This security, sometimes make us as developer to have extra effort to go through that layer.

I found this kind of error when I try to install Laravel Passport.

The "https://repo.packagist.org/packages.json" file could not be downloaded: SSL: An established connection was aborted by the software in your host machine.

I already disabled my Local Area Connection (Intranet LAN), and using my smartphone as a usb tethering modem, but unluckyly i still found that error. Has been trying several workaround and still having no clue for solution, and after all i found this 2 simple commands resolving my problem.

set http_proxy=
set https_proxy=

All two commands do is simply set variable http_proxy and https_proxy  to null. So when I using my own "internet", i don't need to go through proxy that has been set up by my company.

20 September 2018

Laravel + LDAP Error: adldap2/adldap2 requires ext-ldap

Issue: when trying install adldap2 to Laravel, encounter this problem.






Solution: 

Apache
Open your apache directory and open httpd.conf then uncomment this LDAP Module so this module will be loaded when web server starts.

LoadModule ldap_module modules/mod_ldap.so

PHP
Open your PHP directory, and open file PHP.INI and enable PHP LDAP Extension.
extension=php_ldap.dll

Afterall, restart your web server, and check whether LDAP Module has been loaded.
To check, you can create New PHP File consisting this php block codes:




06 July 2018

Mencoba Fitur Image Recognition di Google Lens

Google Lens adalah aplikasi yang ditujukan untuk perangkat mobile yang berfungsi untuk melakukan proses Image Recognition. Aplikasi ini pertama kali diumumkan di event tahunan Google I/O 2017. 

Apa saja fitur Google Lens?
Kalau mengacu pada halaman support google, aplikasi ini dapat mengesktrak informasi jika di dalam foto kita mengandung salah satu dokumen berikut:
  • Business card: You can save the phone number or address to a contact.
  • BookYou can get reviews and other details about it.
  • Landmark or building: You can get more details about it.
  • Painting in a museum: You can get details about it.
  • A plant or animal: You can learn more about it.
  • A flyer or event billboard:  You can add that event to your calendar.

Cara pakainya?
Di HP android saya, Google Lens ini biasanya saya akses ketika kita membuka aplikasi gallery Google Photos. Selain itu google lens bisa juga dibuka via Google Assistant (Hello google :D) atau dengan menginstall aplikasi Google Lens via PlayStore. Kalau dari web resmi google, di beberapa jenis HP, aplikasi Camera nya sudah integrated dengan google lens ini, cuma kurang tahu jenis/seri apa saja yang support fitur tersebut.

Hasil Ujicoba fitur Google Lens
Overall, aplikasi ini keren.. kita bisa menambah ilmu dan pengetahuan tentang apa yang kita foto/lihat. Mungkin istilahnya, google tanpa typing ya..


Sampai sekarang saya juga ngga tahu burung apa yang ada di foto

Aplikasi ini sukses mengenali Landmark
Di foto ini, Google Lens gagal mengenali tulisan yang ada di power point


Namun di foto yang ini, semua tulisan terbaca dengan baik

Burung camar


Tokyo Skytree


Bisa membaca tulisan jepang :D

Bisa mengenali jenis mobil juga euy

Ternyata jago juga mengenali makanan enak 😀 

Kyoto Tower