در حال بارگذاری ...

Finding Files and Opening2:09

So I can do findProfilePicture, and it displays there. Now you can see there are a few options here. You can either find like I did here. So if I press Enter, then this will open it up in Finder. But if I used Open and then hit Enter, OpenProfilePicture, then this will open it up in Preview in this case, since it's an image. Let me just quit Preview here. But you can also search tags. I personally don't use tags, or you can search within files. So I have a code editor here.

Searching File Contents2:36

I personally don't use tags, or you can search within files. So I have a code editor here. Let's just put something in here. Hello from Lerikast. So let's save that and let's search for this string here. So let's do in Hello from Lerikast, and you see it finds it in the appropriate file. Now if I press Enter, it's going to open Xcode because right now Xcode is configured to open PHP files. I don't want that, but there are a few modifier keys which you can use. So Shift allows you to preview the file.

Creating Chords URL Workflow4:23

So for that, there is a website called Ultimate Guitar. And you can search for chords or tabs here. So you can search for either an artist or a song. Let's look for Hotel California. And then you can see the chords here. So you can see the query string we're interested in is this value. And then the query goes in here. So let's grab this entire URL. It's going to Alfred. Let's create a new one.

It's going to Alfred. Let's create a new one. Let's paste this in and we can replace the value in this case with query like this with curly braces. And then we just have to fill the rest in. So I'm going to name it chords for the query. Let me put this in quotes actually. And the query or the keyword, sorry, I want to use is chords or tabs, whatever you want. And you can even drop an icon in here, but we'll just leave it. Okay.

Running Terminal Commands9:17

quit it. And you can also add a confirm button just in case you accidentally press it and you don't want to actually do that. Next up is the terminal. So by default, it's set to the default terminal, but I found this script here on this site, which allows you to make use of iTerm. So I personally don't use this because I already have a shortcut for my iTerm here. But if you want to do that, just prepend with this greater than sign and then add whatever command you want. And this will run it in iTerm.

Killing Processes in Alfred12:05

So yeah, super simple. Next up I have here is kill process. So if you have a process that's taking up your CPU or your memory, then you can use this command kill. For example, here are all the Chrome processes and you can see the CPU usage as well. And you can kill that process straight from Alfred. So usually I would use Activity Monitor to do this, go in here, find the one that's misbehaving and then just kill it through here. But now you can do it through Alfred. Next up is Laravel docs.

Inspecting Workflow Source Code17:00

So for this one, for example, I didn't know what this meant. You can see the most upvoted one, and I can feel like I'm 19 again. Last one I have here is Vue.js docs, similar to all the other documentation ones. You can search the Vue documentation directly from within here. So yeah, those are all my workflows. One more thing I want to show you. Some of these are actually written in php. So this one, the Laravel Docs one, if you right-click, go to Open in Finder, you'll see that it's a basic php project, and if I open this one up, this has most of the functionality in here.

see that it's a basic php project, and if I open this one up, this has most of the functionality in here. So you'll see it's making use of Algolia to search the Laravel documentation and this Alfred workflow package to interact with the Alfred API. So in theory, if I just make a few changes here, or one change, let's look for the loop here. So here is where it loops over all the results it found from the Laravel documentation, and then down here is where it makes a result for it. So if I were to just change this, hard code anything, this should actually change the results.

دوست دارید گاهی خبرهای Laracasts را ایمیل کنیم؟