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
const fs = require('fs'); | |
const https = require('https'); | |
const WebSocket = require('ws'); | |
const server = https.createServer({ | |
cert: fs.readFileSync('/home/user/certificates/test.com.crt'), // Domain SSL Certificate | |
key: fs.readFileSync('/home/user/certificates/test.com.key'), // Domain SSL Private Key | |
}); | |
const wss = new WebSocket.Server({ server }); |
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 | |
function shutdown(){ | |
$includedFiles = print_r(get_included_files(), true); | |
\Log::info($includedFiles); | |
} | |
register_shutdown_function('shutdown'); | |
/** |
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 | |
# Multiple SPF Records Yandex and Mailgun | |
v=spf1 include:mailgun.org include:_spf.yandex.net ~all | |
# PHP ini | |
max_execution_time = 90 | |
max_input_time = 90 | |
memory_limit = 1024M | |
post_max_size = 20M |
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 | |
// ... | |
// Location: /phpoffice/phpexcel/Classes/PHPExcel/Cell/DefaultValueBinder.php | |
/** | |
* DataType for value | |
* | |
* @param mixed $pValue | |
* @return string |
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
sudo service apache2 stop | |
sudo apt-get purge apache2* | |
sudo apt-get autoremove | |
whereis apache2 | |
sudo rm -rf /etc/apache2 |
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
CREATE DATABASE test_db ENCODING='UTF-8' LC_COLLATE='tr_TR.UTF-8' TEMPLATE=template0; |
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
''' Hücreye ait yorum bilgisini döndürür. | |
''' Örnek Kullanım; =getComment(A2) | |
''' | |
Function getComment(xCell As Range) As String | |
On Error Resume Next | |
getComment = xCell.Comment.Text | |
End Function |
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 | |
function auto_featured_image() { | |
global $post; | |
if ( ! has_post_thumbnail($post->ID) ){ | |
$attached_image = get_children("post_parent=$post->ID&post_type=attachment&post_mime_type=image&numberposts=1"); | |
if ($attached_image) { | |
foreach ($attached_image as $attachment_id => $attachment) { | |
set_post_thumbnail($post->ID, $attachment_id); |
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 | |
function mail_utf8($from,$from_name,$to,$adi,$subject,$body=''){ | |
// Konu | |
$subject = "=?UTF-8?B?".base64_encode(urldecode($subject))."?="; | |
// Header bilgisi | |
$headers = 'MIME-Version: 1.0' . "\r\n"; | |
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n"; |