Skip to content

Instantly share code, notes, and snippets.

View ucay's full-sized avatar
💪
Let's Rock n Roll

Ulumuddin Cahyadi Yunus ucay

💪
Let's Rock n Roll
View GitHub Profile
@miguelmota
miguelmota / default
Last active January 30, 2023 02:28
Nginx + Node.js server configuration. Blog post: http://www.miguelmota.com/blog/nodejs-and-ngnix-on-ubuntu/
# The upstream module is the link between Node.js and Nginx.
# Upstream is used for proxying requests to other servers.
# All requests for / get distributed between any of the servers listed.
upstream helloworld {
# Set up multiple Node.js webservers for load balancing.
# max_fails refers to number of failed attempts
# before server is considered inactive.
# weight priorities traffic to server. Ex. weight=2 will recieve
# twice as much traffic as server with weight=1
server <your server ip>:3000 max_fails=0 fail_timeout=10s weight=1;
@gnutix
gnutix / DoctrineDbalStatementInterface.php
Created December 2, 2013 09:07
Mock Builder for Doctrine EntityManager / Connection mock objects.
<?php
namespace Mocks;
use Doctrine\DBAL\Driver\Statement;
/**
* Doctrine DBAL Statement implementing \Iterator.
*
* This class has been created because of a bug in PHPUnit Mock Objects.
@DavidGarciaCat
DavidGarciaCat / .sensiolabs.yml
Last active July 31, 2017 12:21
SensioLabs Insight - What We Analyze: "Based on the experience of the SensioLabs Audit team, we established a list of 108 control points to make sure an application is safe, reliable, maintainable, that it follows standards and good practices."
rules:
# CRITICAL - SECURITY
# Projects must not depend on dependencies with known security issues
composer.security_issue_in_composer:
enabled: true
# Database queries should use parameter binding
doctrine.database_query_contains_string_and_variable_concatenation:
enabled: true
# PHP debug statements found
php.debug_statements: