This file contains hidden or 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 exportExcel($filename='ExportExcel', $columns=array(), $data=array(), $replaceDotCol=array()){ | |
| header('Content-Encoding: UTF-8'); | |
| header('Content-Type: text/plain; charset=utf-8'); | |
| header("Content-disposition: attachment; filename=".$filename.".xls"); | |
| echo "\xEF\xBB\xBF"; // UTF-8 BOM | |
This file contains hidden or 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
| redis-cli> INFO keyspace | |
| # Keyspace | |
| db0:keys=7,expires=0,avg_ttl=0 | |
| db1:keys=1,expires=0,avg_ttl=0 | |
| db2:keys=1,expires=0,avg_ttl=0 | |
| db11:keys=1,expires=0,avg_ttl=0 |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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); |