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
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. |
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
# Install package first: | |
# pip install PyMuPDF Pillow | |
import fitz | |
import io | |
from PIL import Image | |
file = "source.pdf" | |
pdf_file = fitz.open(file) |
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
// source: | |
// https://github.com/verssache/qris-dinamis/blob/main/qris.php | |
// 00020101021126570011ID.DANA.WWW011893600915302259148102090225914810303UMI51440014ID.CO.QRIS.WWW0215ID10200176114730303UMI5204581253033605802ID5922Warung Sayur Bu Sugeng6010Kab. Demak610559567630458C7 | |
echo "[+] QRIS Statis to Dinamis Converter - By: GidhanB.A\n"; | |
echo "[+] Input Data QRIS: "; | |
$qris = trim(fgets(STDIN)); | |
echo "[+] Input Nominal: "; | |
$qty = trim(fgets(STDIN)); |
- 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\Controllers; | |
use Illuminate\Http\Request; | |
use Illuminate\Support\Facades\App; | |
use Illuminate\Support\Carbon; | |
use GuzzleHttp\Psr7; | |
use GuzzleHttp\Client; | |
use GuzzleHttp\Exception\ClientException; |
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
/** | |
* source: | |
* https://github.com/guzzle/guzzle/blob/7.5/src/MessageFormatter.php#L12 | |
* | |
* Formats log messages using variable substitutions for requests, responses, | |
* and other transactional data. | |
* | |
* The following variable substitutions are supported: | |
* | |
* - {request}: Full HTTP request message |
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
.htaccess flag list | |
C Chained with next rule | |
CO Cookie (set specified cookie | |
E var:value (set Environment variable var to value) | |
F Forbidden - sends a 403 header to the user | |
G Gone - no longer exists | |
H Handler (set handler) | |
L Last - stop processing rules |
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
./configure OPENSSL_CFLAGS=-I/opt/openssl/include/ OPENSSL_LIBS="-L/opt/openssl/lib64/ -lssl -lcrypto" \ | |
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig \ | |
--with-config-file-path=/etc/php \ | |
--sysconfdir=/etc/php.d \ | |
--enable-mysqlnd \ | |
--with-pdo-mysql \ | |
--with-pdo-mysql=mysqlnd \ | |
--with-pdo-pgsql=/usr/bin/pg_config \ | |
--enable-bcmath \ | |
--enable-fpm \ |
NewerOlder