Profile
Achievement

suibhne's Recent Snippets
- All /
« Prev 1 Next »
Code that will convert a simple Hex code value (from HTML colors) to an actual useable NSColor.
0
699
posted 11 years ago by suibhne
This code will resize a UILabel so that the label is as small as it can be in both width and height, based on the text in it and the font used.
1
651
posted 12 years ago by suibhne
This adds a UITextField to a table view so that you can enter a value with the keyboard.
0
463
posted 12 years ago by suibhne
This is a simple SQL statement which will update all the posts within a Wordpress installation changing the domain which files were uploaded to.
Very handy if migrating a site from a test to live environment and all embedded images are referenced...
0
552
posted 12 years ago by suibhne
This snippet of code added to line 1404 of wpsc_query.php finds a single product by the product url AND category its in. The default is to only look up a product by its url only, not including the category, meaning you can't have a product in more th...
0
393
posted 12 years ago by suibhne
Something simple to add all levels of Wordpress menus to a plugin in the admin area.
1
394
posted 12 years ago by suibhne
Just a simple loop around an NSMutableArray, but also removing an item if need be.
1
459
posted 12 years ago by suibhne
This adds a spinning activity indicator to the top navigation bar of a navigation controller.
0
511
posted 13 years ago by suibhne
Some code that will load an image from a remote URL, and then resize it.
6
891
posted 13 years ago by suibhne
Function which will slugify a string for use in URLs, taking out any spaces and other non-URL useful characters.
0
919
posted 13 years ago by suibhne
Just a simple loop around a mutable dictionary object which I always seem to forget.
1
448
posted 13 years ago by suibhne
Just replace a character within a string (e.g. carriage returns).
1
481
posted 13 years ago by suibhne
Just something simple to set and get the value of an form input field.
0
409
posted 13 years ago by suibhne