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
#!/bin/bash | |
while: | |
do | |
node server.js | |
echo "server crached!" | |
sleep 1 | |
done |
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
server { | |
server_name abc.com; | |
listen 80; | |
access_log /var/log/nginx/access.log; | |
error_log /var/log/nginx/error.log; | |
root /home/app/html-app/dist; | |
index index.html index.htm; |
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
class Debug | |
{ | |
private $debug = true; | |
private $start_time = 0; | |
/** | |
* prints debug message | |
* @param type $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
/** | |
* This is the custom extractvalue function for doctrine. | |
* | |
* www.eftakhairul.com | |
*/ | |
use Doctrine\ORM\Query\Lexer; | |
use Doctrine\ORM\Query\AST\Functions\FunctionNode; |
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
INSERT INTO SENDABLE_DOCUMENT (DOCUMENT_ID) | |
SELECT p1.ID FROM ( | |
SELECT p2.document_id AS ID, ROWNUM AS ID_ROWNUM FROM ( | |
SELECT document_id FROM document_date | |
INNER JOIN SYNDICATED_DOCUMENT sd ON document_date.document_id = sd.ID | |
WHERE type_id = :published and document_id not in (SELECT document_id FROM document_date where type_id = :sent) | |
) p2 WHERE ROWNUM <= :maxRow | |
) p1 WHERE ID_ROWNUM >= :minRow |
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
#Static initialization | |
All static initialization get call first before main method and contractor. | |
#constructor | |
If a sub class extends from parents class, then if you create the instance of Subclass, automatically parents constructor will get called. | |
#Protected Modifier | |
he protected modifier specifies that the member can only be accessed within its own package (as with package-private) and, in addition, by a subclass of its class in another package. | |
#final |
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
server { | |
listen 80 default_server; | |
listen [::]:80 default_server; | |
server_name example.com; | |
return 301 https://$server_name$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
<VirtualHost *:80> | |
ServerAdmin mail@eftakhairul.com | |
DocumentRoot /home/app/php-app | |
ServerAlias www.abc.com | |
ServerName abc.com | |
<Directory /home/app/php-app> | |
Options Indexes FollowSymLinks MultiViews | |
AllowOverride all | |
Order allow,deny |
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
server { | |
server_name abc.com; | |
return 301 http://xyz.com; | |
} | |
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
server { | |
server_name staging.io; | |
listen 80; | |
access_log /var/log/nginx/staging.io.access.log; | |
error_log /var/log/nginx/staging.io.error.log; | |
root /home/app/snap-ui/dist; | |
index index.html index.htm; |