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:

And […]

Read More

Laravel update from v.5.0.35 to v.5.2.32 hiccups and solutions

I tried to update Laravel 5 today and here were the steps I had to take. First checked my Laravel version before the update:

Edited composer.json in my laravel’s root folder like such:

Run this on command line:

You might need to delete root folder’s composer.lock file before the update can actually […]

Read More

Android Development: Permission denied when running ./gradlew in Mac

I’m using a Mac at the moment to work on my Android app projects. For some reason I need to run ./gradlew in the terminal, but I was getting this error: -bash: ./gradlew: Permission denied To fix this, what I did was run the following commands:

After those commands, my Mac downloaded numerous files […]

Read More

JavaScript: Get current function name

getCallingFunctionName() is the important function here.

Source: Can I get the name of the currently running function in JavaScript?

Read More

Android: Switch into another activity

To switch into another activity, the method we use is startActivity(). This is what starts another Android activity:

Replace NameOfActivity with the name of any activity you’d like to switch into.

Read More

Android: Basic WebView Tutorial

A WebView lets you pull a web page and display it in your Android app. It doesn’t take long to implement an Android WebView. Read on. I’ll show you how. AndroidManifest.xml First, open your manifest file to add this permission for INTERNET:

The web page won’t be loaded into your app without this permission. […]

Read More