https://www.sublimetext.com/docs/2/revert.html I’m using a Mac Mini with OS X El Capitan (v. 10.11) with Sublime Text v.2.0.2. Today, Sublime Text shortcuts like Cmd + / (line comment), Cmd + D (multiple selection), Cmd + F (find) and others stopped working. I had no problem with those key bindings before until today. Based on research, I […]
Laravel 5 RESTful API with Basic Auth: PHPUnit Testing
I’ve been using PHPUnit to test my RESTful API. PHPUnit is ready to use in Laravel. In my Laravel-based RESTful API, I have an endpoint /api/users which returns JSON data when you send a GET request. The API will only return such data if the client sends the corrent username and password (Basic Authentication). The […]
Android M runtime permissions utility class
Hello world, I prepared a PermissionsUtil.java class and it’s on GitHub. Check it out: AndroidPermissionsUtil Why use it? It will help by letting you write less code as you add conditions to your Android app that supports Android 6.0 (Marshmallow). The utility class defines helper methods that were used in the following example. Sample usage […]
Rama Beach Resort – photos & review (Botolan, Zambales)
This was an old draft that took long to get published. 😆 The Travel My bottom hurt from the long bus ride. At Monumento, we took a bus bound for Iba, Zambales. The travel was over 5 hours, if I remember correctly. We had stopped over places several times, for not a short period of […]
Rockpoint Hotspring Resort Hotel – rates & review
This was an old draft that took long to get published. 😆 Our stay at Rockpoint Hotel wasn’t bad. It wasn’t one of the best hotels we stayed at, but it had most of what we needed. This resort is in Laguna. Holiday Rates (2015) at Rockpoint Hotspring Resort Hotel These were the rates when […]
Android app codes for Google Maps with clustering
I prepared Android app codes with Google Maps and clustering feature. Feel free to use these as basis for your new projects. They are on GitHub: [1] Default Map Markers: catzie/SimpleAndroidMapClustering [2] Custom Map Markers: catzie/Simple-Android-Map-Clustering-with-Custom-Markers I simply took the necessary classes and res files from Android Maps Utility demo, and then placed […]
Android Maps: Get current location coordinates with Google API Client Builder
To get your current location via Google Map in an Android app, this was how we do it:
1 2 3 4 |
@Override public void onMapReady(GoogleMap googleMap) { Location location = googleMap.getMyLocation(); } |
Stop. Don’t use that! The method GoogleMap.getMyLocation() is deprecated. Instead, we need to use FusedLocationApi and the callback onLocationChanged(). Here’s an example code that works for me ( consider copying the contents of onResume() into onStart() […]
Bash: rename all files in directory, replacing all hyphens (-) with underscores (_)
I don’t want to waste time doing things manually when I can run a script that will help me save time and effort. When using Linux or Mac command line (bash?), if you want to rename all files in your present directory and replace all hyphens – with underscores _, run this command:
1 |
for f in *-*; do mv "$f" "${f//-/_}"; done |
And […]
This place will never be the same again
When I first came to that place, that “existence” was there. It was at first an annoyance to me and made my blood boil quite a few times, even after moving to this new place. Occasionally this existence would speak of wise words such as “Be the better person.” Now, that existence is gone. But […]
Android Studio: add Google Map from empty activity (dev note)
//Update: I prepared a simple Android app that features a Google Map with markers that form clusters together when zoomed out. Check it out: Simple Android Map Clustering on GitHub. This “dev note” of mine will give you a rough idea on how to add a Google Map to your Android up from an empty […]