Today I learned about a powerful WordPress function that can create a new array from an object. According to its WP Codex description, it does the ff: Pluck a certain field out of each object in a list (Kind of a straightforward definition lol) // Say this is our array $player_info = array( array( ‘name’ => ‘Kobe Bryant’,…
Category: Code
Code, Thoughts
The Struggle Is Rails
by Kat Padilla • • 0 Comments
Late last year, I’ve decided to put “Learn A New Language” in my goals for 2014. I thought I had all the confidence to do it– to take another step towards improving my programming skills tremendously, and learn another language. My officemates know Rails (Ruby) and I can easily ask them whenever they’re free. One…
Code
I Caught Pi Today! 3.1415927
by Kat Padilla • • 0 Comments
March 3, 2014 means it is Pi Day! I was able to catch 7 decimal places of π today by echo-ing date + format in Linux. Haha. I waited for the 14th day of March at 1:59 PM and 26 seconds for this! I only thought of doing this after my officemate told me about someone who…
Code
.gitignore All The Files!
by Kat Padilla • • 0 Comments
This is an example of a .gitignore file that will ignore all files except the ones you specify. This is what I’ve been using for my WordPress development. Note: This is a product of constant research (aka Google-ing) and failed development practices. /* !.gitignore !themes themes/* !themes/katpadi-theme The first line says that it will ignore ALL…
Code
WP Local Instance Installer
by Kat Padilla • • 0 Comments
Of course, I am back to my WP projects. I’ve had some taste of RoR for the past few weeks but all things come to an end. At least for now. Our QA engineer once wanted to install a copy of the site that I was developing but we didn’t have the staging server up…
Code
Adventures in Semi-Automatic WP Deployment
by Kat Padilla • • 0 Comments
I am back to doing WP projects and it’s just now that I realize that I need to make things simpler. Enter site deployment. For me, deployment is the most tedious part of development. Coding is fun but I hate WP deployment mainly because it is such a pain in the ass. This is why…
Code
Use of Symlink in WP Development
by Kat Padilla • • 0 Comments
In a perfect world, one should not edit the WordPress core so it is just proper to separately develop, update and version control the plugins and themes. With that said, WordPress development can be a pain in the ass when it comes to migrating, testing or deployment. The placing of things and permissions, etc. can…
Code
My First Lines of Rails
by Kat Padilla • • 0 Comments
Parents usually take a picture of their baby’s first haircut. Me? I am not a parent so I don’t. Instead, I blog about the first lines of codes that I write when I’m learning a new language. So I was asked to help for a particular Rails project! Yay. The issues for me were just simple…
Code
WP Transients to Cache API Response
by Kat Padilla • • 0 Comments
Being the amateur person that I am, I did not employ caching in my API calls just recently. I ignored its importance because I didn’t expect we would get that many hits. (Hey, the site wasn’t serious initially!) Either way, it’s still unacceptable. Come on Kat, you should know better than this!!! API response data…
Code
My RoR Primer
by Kat Padilla • • 1 Comment
They say learning never stops. I couldn’t agree more. Coincidentally, my boss thinks this way as well so he advised me to read on Python and/or Ruby on Rails. My officemate suggested this e-book called Learn Ruby on Rails by Daniel Kehoe. Heh. The tutorial is VERY straight-forward. The author tells you a little something,…