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 read_socket($socket) | |
| { | |
| while($rawData = fgets($socket)) { | |
| $data .= $rawData; | |
| } | |
| return $data; | |
| } |
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
| /** | |
| * async multi threading with c++ | |
| * flag : -pthread -std=c++0x | |
| */ | |
| #include <iostream> // std::cout | |
| #include <unistd.h> // sleep(); | |
| #include <future> // std::async | |
| class MyClass { |
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
| /** | |
| * sync multi threading with c++ | |
| * flag : -pthread -std=c++0x | |
| */ | |
| #include <thread> | |
| #include <iostream> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| class MyClass { |
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
| #include <dirent.h> | |
| #include <iterator> | |
| #include <cstdlib> | |
| #include <cstring> | |
| #include <sstream> | |
| #include <iostream> | |
| #include <stdlib.h> | |
| #include <string> | |
| #include <sys/stat.h> | |
| #include <syslog.h> |
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 | |
| /** | |
| * Copyright (c) 2020 Ramdhan Firmansyah | |
| * File : encode.php | |
| * @author : Cvar1984 <[email protected]> | |
| * Date : 28.04.2020 | |
| * Last Modified Date: 28.04.2020 | |
| * Last Modified By : Cvar1984 <[email protected]> | |
| */ |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <title>Cvar1984</title> | |
| <meta name="author" content="Cvar1984" /> | |
| <meta | |
| name="viewport" | |
| content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" | |
| /> |
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 | |
| class MyClass | |
| { | |
| public int $property; | |
| } | |
| $obj = new MyClass(); | |
| $obj->property = 1; | |
| $normal = $obj->property; |
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 | |
| for ($i = 1; $i <= 5; ++$i) { // copy 5 process and daemonize | |
| $pid = pcntl_fork(); | |
| if (!$pid) { | |
| for($x=1; $x <=2; $x++) { // loop 2x | |
| echo 'Task ' . $x . PHP_EOL; | |
| sleep(1); | |
| } | |
| //echo 'In child proccess ' . $i . PHP_EOL; |
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
| #!/usr/bin/env php | |
| <?php | |
| /* | |
| * Copyright (c) 2019 <cvar1984> | |
| * | |
| * Licensed unter the Apache License, Version 2.0 or the MIT license, at your | |
| * option. | |
| * | |
| * ******************************************************************************** |
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
| # for termux | |
| # This is the main Apache HTTP server configuration file. It contains the | |
| # configuration directives that give the server its instructions. | |
| # See <URL:http://httpd.apache.org/docs/2.4/> for detailed information. | |
| # In particular, see | |
| # <URL:http://httpd.apache.org/docs/2.4/mod/directives.html> | |
| # for a discussion of each configuration directive. | |
| # | |
| # Do NOT simply read the instructions in here without understanding | |
| # what they do. They're here only as hints or reminders. If you are unsure |