flock -xn /tmp/laravel_queues.lockfile -c "/usr/local/bin/php /home/user/www/project/artisan queue:work --sleep=3 --tries=3"
| // | |
| // KitTextField.swift | |
| // | |
| // Created by [email protected] on 10/6/20. | |
| // | |
| import SwiftUI | |
| struct KitTextField: UIViewRepresentable { | |
| let label: String |
I think most of you guys know GCD pretty well. Basically, GCD is a high level API to handle multi-threading operations. We use GCD almost on daily basis to switch thread and execute codes like:
DispatchQueue.main.async { //execute some codes here }
//switch to main queue and execute codes asynchronously
DispatchQueue.main.sync { //execute some codes here }
//switch to main queue and execute codes synchronously| // | |
| // BottomSheetView.swift | |
| // | |
| // Created by Majid Jabrayilov | |
| // Copyright © 2019 Majid Jabrayilov. All rights reserved. | |
| // | |
| import SwiftUI | |
| fileprivate enum Constants { | |
| static let radius: CGFloat = 16 |
| <VirtualHost *:443> | |
| DocumentRoot "path/to/public/directory" | |
| ServerName domain.example.com | |
| SSLEngine on | |
| SSLCertificateFile "conf/ssl.crt/server.crt" | |
| SSLCertificateKeyFile "conf/ssl.key/server.key" | |
| <Directory "path/to/public/directory"> | |
| Options Indexes FollowSymLinks Includes ExecCGI |
| RewriteEngine On | |
| # Robots.txt for Staging and Production -- change productiondomain.com to the actual url of your production site | |
| RewriteCond %{HTTP_HOST} !productiondomain.com$ [NC] | |
| RewriteRule ^robots.txt robots_dev.txt [L] |
The following are instructions for running scheduled tasks defined in a Laravel project on Windows. The Laravel documentation provides instructions for running scheduled tasks using cron jobs on Linux systems. However, cron jobs are not available on Windows. The built-in Windows Task Scheduler can be used to run scheduled tasks instead.
- Open Task Scheduler
- Select Create Task...
- Give the task a name and description
- To run the task in the background, select Run whether the user is logged on or not and check the Hidden checkbox.
| <!doctype html> | |
| <title>Site Maintenance</title> | |
| <style> | |
| body { text-align: center; padding: 150px; } | |
| h1 { font-size: 50px; } | |
| body { font: 20px Helvetica, sans-serif; color: #333; } | |
| article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
| a { color: #dc8100; text-decoration: none; } | |
| a:hover { color: #333; text-decoration: none; } | |
| </style> |
You can create Projects which contains multiple folders and can have individual settings depending on the project. A project is a folder or a group of folders saved at a certain state that will be remembered everytime you close the project.
You can also quick switch between projects with CMD + CTRL + P or CTRL + ALT + P
If your are using Atom or vscode there is a plugin to add this behavior: