Alfred Snippets
I am a big fan of the application launcher Alfred. To call it an application launcher is an understatement as it is very powerful. In my day to day usage I probably only use a quarter of its entire feature set.
One feature I’ve been using a lot more of lately is its snippets. This is considered a power feature and requires the “power pack” that costs between £17.00 (single license) and £32.00 (mega supporter).
To set up snippets launch Alfred and go to settings. Then Features -> Clipboard -> Snippets. (The screenshot above is from this area)
Once you are on this screen you can add shortcuts of text that you typically use.
Here are the ones that I use a lot:
Today
This just generates today’s date:
[code lang=”text”]
{date}
[/code]
Laravel Query Debugging
For those times when you want to see the SQL being generated by a query:
[code lang=”php”]
\DB::listen(function($sql, $bindings, $time) {
var_dump($sql);
var_dump($bindings);
var_dump($time);
});
[/code]
Lorem Ipsum Text
I surprisingly use this a lot.
[code lang=”text”]
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
[/code]
Stripe Credit Card Testing
I use two numbers for most common testing:
Valid Card
[code lang=”text”]
4242424242424242
[/code]
Declined Card
[code lang=”text”]
4000000000000002
[/code]
Changing the Snippet keyword
If you’d like another shortcut other than snip
you can set this from the history tab
I know several other apps handle snippets but I like Alfred since I already use it all the time and it prevents me from having to have multiple apps open.