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 Tests\Feature; | |
use App\Temperature; | |
use Illuminate\Foundation\Testing\RefreshDatabase; | |
use Illuminate\Foundation\Testing\WithFaker; | |
use Mockery; | |
use Tests\TestCase; |
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 | |
$message = (new Swift_Message('Wonderful Subject')) | |
->setFrom(['noreply@example.org' => 'John Doe']) | |
->setReplyTo('reply@example.org', 'Reply To') | |
->setTo(['receiver@domain.org', 'other@domain.org' => 'A name']) | |
->setBody('mail body', 'text/html') | |
; | |
// Swiftmail 는 sent box 에 남기지 않으므로 아래 꽁수로 imap_처리 | |
// https://stackoverflow.com/questions/19497557/add-mail-to-send-folder-with-swiftmailer |
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 | |
require_once '/path/to/vendor/autoload.php'; | |
$host = env('MAIL_HOST'); | |
$user = env('MAIL_USERNAME'); | |
$port = env('MAIL_PORT'); | |
$password = env('MAIL_PASSWORD'); | |
$security = env('MAIL_ENCRYPTION'); |
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
#!/usr/bin/env bash | |
if ! command -v "gls" &> /dev/null; then | |
echo "GNU coreutils not installed!"; | |
exit 1; | |
fi | |
if [ "$EUID" -ne 0 ];then | |
echo "Please run as root" | |
exit |
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 | |
/** | |
* 사업자 번호 유효성 검증 | |
* | |
* @param string $bizNumberParam 검증할 사업자 번호 | |
* | |
* @return bool | |
* | |
* @see https://www.lesstif.com/pages/viewpage.action?pageId=93126973 사업자 번호 검증 규칙 |
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
## confluence vhost | |
server { | |
listen 80; | |
server_name example.com default_server; | |
root /var/www/www.example.com; | |
error_page 502 = /http_502.html; | |
return 301 https://www.example.com$request_uri; | |
} |
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 javax.crypto.Mac; | |
import javax.crypto.spec.SecretKeySpec; | |
public class HMacTest { | |
public static final String ALGORITHM = "HmacSHA256"; | |
public static String calculateHMac(String key, String data) throws Exception { | |
Mac sha256_HMAC = Mac.getInstance(ALGORITHM); |
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 declare(strict_types = 1); | |
/** | |
* phpstan sample | |
* | |
* Class HelloWorld | |
* @package App | |
*/ | |
class HelloWorld | |
{ |
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
# Other default tuning values | |
# MySQL Server Instance Configuration File | |
# ---------------------------------------------------------------------- | |
# Generated by the MySQL Server Instance Configuration Wizard | |
# | |
# | |
# Installation Instructions | |
# ---------------------------------------------------------------------- | |
# | |
# On Linux you can copy this file to /etc/my.cnf to set global options, |
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] | |
;;;;;;;;;;;;;;;;;;; | |
; About php.ini ; | |
;;;;;;;;;;;;;;;;;;; | |
; PHP's initialization file, generally called php.ini, is responsible for | |
; configuring many of the aspects of PHP's behavior. | |
; PHP attempts to find and load this configuration from a number of locations. | |
; The following is a summary of its search order: |