There are a number of ways to compress and uncompress files and folders in a linux terminal but I typically use tar.gz; Continue reading “Compress Uncompress files in Linux”
Modern Javascript Cheatsheet
I found this via @gziola on Twitter. It’s a smart and extensive cheatsheet for the JavaScript knowledge you will frequently need in modern projects.
Kudos to mbeaudru : https://github.com/mbeaudru/modern-js-cheatsheet
Git clone without project folder
I am using Git a lot these days. Git is arguably the best version control software out there especially for collaborative projects.
Find subset of associative array in PHP
This is a simple way to get a subset of associative array elements using an array of keys; basically you extract out the elements you want from a bigger array by listing the keys you need. Continue reading “Find subset of associative array in PHP”
Visual debug tool for Regular Expressions
When working with regular expressions, it can be difficult to understand why a particualar pattern is not working as you would expect.
The visual debug tool at debuggex.com makes it much easier to step through and actually visualize how a pattern is working or, as is often the case, not working.
Here is an overview of how it works.
Simple guide to Github
Love this simple and well illustrated guide to some github basics: http://rogerdudler.github.io/git-guide/
Regex – Find everything except – Caret
I found this regex useful when parsing log files to find everything except the data I needed. I can select and delete everything I don’t need and I am left with the lines of data I can work with. Continue reading “Regex – Find everything except – Caret”
Convert Large Integer to Hexadecimal without PHP Math extension
PHP has a couple of functions to convert integers to hexadecimal, dechex() and base_convert(). However, both functions lose precision on large integers.
Continue reading “Convert Large Integer to Hexadecimal without PHP Math extension”
WordPress Localization Plugin for Sublime Text
I wrote this plugin for Sublime Text to help on a project where I am localizing a lot of text.
I found I was copy and pasting the same i18n methods over and over so I decided that there must be a relatively easy way to automate this using a plugin.
Now I select some text, press my key shortcut and the text gets replaced with the appropriate i18n method.
Continue reading “WordPress Localization Plugin for Sublime Text”
Meet WordPress coding standards on Sublime Text – SublimePhpTidy
I made the move from Coda to Sublime Text this week.
After only a week, I really, really like Sublime Text – it’s fast, pretty and customizable with a wide range of plugins available via the Package Manager.
Here are 9 reasons Sublime Text is only mighty!
I came across an old Coda plugin that I did some work on years ago that is now available on Sublime Text; the plugin helps to tidy and format your code to meet WordPress coding standards.
The plugin is available here – https://github.com/welovewordpress/SublimePhpTidy
It is pretty cool to see something you did a few years ago being picked up by someone else, improved upon and ported to a new editor that you happen to move to :).