Show History of Changes to Specific File with Git
I am always having to google this to find the correct command.
I often need to see a history of changes to a specific file.
The best command I have found for this so far is:
git log -p [filename]
Set User and Group Permissions Correctly in Linux (Ubuntu)
I often struggle to get the file permissions set up correctly in Linux, especially in a web server setup.
However I think I've finally stumbled upon the magic incantations to make it all work...
Set the group / owner of a directory recursively:
Git Diff Show Changes on Branch Only
git diff master...feature
That shows only new changes on feature with respect to master.
Auto Format Entire Document in Vim
gg=G auto-formats the entire document:args src/**/*.<ext> | argdo silent execute "normal gg=G" | update fixes all source files indentation— Mastering Vim (@MasteringVim) April 22, 2017
Eventbrite API Event Series Query with Ticket Data
I needed to get some data from the Eventbrite API. It took a bit of effort to build the request URL that I needed.
The events I wanted the data fro where recurring. I also wanted to know how many tickets where available for
How do I pull a native DOM element from a jQuery object?
Ruthless plagiarised from the jQuery website
A jQuery object is an array-like wrapper around one or more DOM elements. To get a reference to the actual DOM elements (instead of the jQuery object), you have two options. The first (and
Create Wordpress User in phpMyadmin SQL
This simple sql script will create a Wordpress user.
You'll need access to the database via phpMyadmin or another means..
INSERT INTO wp_users (user_login, user_pass, user_nicename, user_email, user_status)
VALUES ('username', MD5('password'), 'Firstname Lastname', 'email address', '0');
INSERT INTO wp_usermeta (umeta_id, user_id, meta_key, meta_value)
VALUES (NULL, (Select max(id) FROM wp_users), 'wp_capabilities',
Magento 1 Rest Api Multiple SKU Query
It took me a long time to track down this solution to get multiple products by SKU out of the Magento Rest API... But here's the solution I've found:
Open All Files Staged in Git in Vim
vim git status --porcelain | sed -E -e 's/^M|^A//g'
This is working for me in iTerm on my Mac...
Find Magento Layout Handle for Current Controller/Action
I is still getting the hang of the whole Magento layout functionality but have just found a couple of tips that have helped me greatly.
As I understand it the layout handle of and xml file is the node that is called when a particular…