Use the following configuration in Apache's httpd.conf file or within a virtual host configuration. Note that you should set DocumentRoot
and ServerName
fit to your environment:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Dappa\AuthTests; | |
use Illuminate\Support\ServiceProvider; | |
/** | |
* Auth test service provider | |
*/ | |
class AuthTestsServiceProvider extends ServiceProvider |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import servicemanager | |
import socket | |
import sys | |
import win32event | |
import win32service | |
import win32serviceutil | |
class TestService(win32serviceutil.ServiceFramework): | |
_svc_name_ = "TestService" #Service Name (exe) | |
_svc_display_name_ = "Test Service" #Service Name which will display in the Winfows Services Window |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OneDrive.exe as a Windows Service | |
================================= | |
Flemming Steffensen, 2017, 2021 | |
For our automatic build setup, we needed to fetch some files off a Sharepoint Library. | |
Sharepoint allows (if configured so) Lists and Libraries to be synchronized to a local folder by using the OneDrive application. | |
However, the OneDrive application is started when a user logs in, and in an automated build setup, this never happens. | |
The solusion were to disable the normal auto-start feature of OneDrive, and then install it as a service, and making sure the | |
service start as the computer starts. |
- If your users come from many timezones, consider keep using UTC, leave the timezone configuration on the user side. Use this package for timezone conversion.
- If you're using Laravel 11, you can use .env instead.
Change method boot
use Carbon\Carbon;
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define("SHARED_SECRET", "sup3rs3cr3t!!"); | |
if(!function_exists('hash_equals')) { | |
function hash_equals($str1, $str2) { | |
// Run constant-time comparison for PHP < 5.6 which doesn't support hmac_equals | |
$str1_len = strlen($str1); | |
$str2_len = strlen($str2); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Middleware; | |
use Closure; | |
use Symfony\Component\HttpFoundation\ParameterBag; | |
/** | |
* @author https://github.com/Stunext | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Providers; | |
use GuzzleHttp\Client; | |
use GuzzleHttp\Exception\RequestException; | |
use GuzzleHttp\HandlerStack; | |
use GuzzleHttp\Middleware; | |
use GuzzleHttp\Promise\PromiseInterface; | |
use Illuminate\Contracts\Foundation\Application; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/*############################# | |
* Developer: Mohammad Sharaf Ali | |
* Designation: Web Developer | |
* Version: 1.0 | |
*/############################# | |
// SETTINGS | |
ini_set('max_execution_time', 0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Create Subdomains | |
* | |
* Note: This script was designed to be called silently by a bash script for project creation. | |
* Add to bash script: php "$HOME/scripts/php/create-subdomains.php" "$new_account_subdomain" | |
* | |
* Requires "jamesryanbell/cloudflare": "^1.11" for the CloudFlare PHP library | |
* Recommends "kint-php/kint": "^3.2" for improved temporary PHP debugging |
NewerOlder