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
server { | |
listen 443 ssl; | |
server_name api.server.com; | |
ssl_certificate /etc/ssl/cloudflare/api.pem; | |
ssl_certificate_key /etc/ssl/cloudflare/key.key; | |
client_max_body_size 20M; | |
location / { |
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
// Coupled to framework (a service knowing about the implementation of the data layer) | |
class OrderService | |
{ | |
public function getOrders(): iterable | |
{ | |
return Order::all(); | |
} | |
} | |
// Not coupled to framework |
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
[supervisord] | |
user=root | |
nodaemon=true | |
logfile=/dev/null | |
logfile_maxbytes=0 | |
pidfile=/var/run/supervisord.pid | |
loglevel = INFO | |
[unix_http_server] | |
file=/var/run/supervisor.sock |
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
name: Tests | |
on: | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
name: Run tests | |
runs-on: ubuntu-latest |
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
public function __invoke(User $user): void | |
{ | |
if (!$user instanceof UserInterface) { | |
return; | |
} | |
// some great stuff here | |
} |
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
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "node", | |
"request": "launch", | |
"name": "Debug Nest Framework", |
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
Options FollowSymLinks | |
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*)$ index.php?/$1 [L] | |
</IfModule> |
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 | |
foreach ($imgPaths as $img) { | |
echo '<img src="' . $img->attr["src"] . '"'/> | |
} |
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
// factory.js | |
.factory('Nombre', ['$resource', function ($resource) { | |
return $resource('http://url.api/api/login', {}, { | |
save: { | |
method: 'POST', | |
headers: {Authentication: 'tu_token_o_apikey'} | |
} | |
}); | |
}]); |
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
/** | |
* @param $msisdn | |
* @param $amount | |
* @param $token | |
* @return array | |
*/ | |
public function getBill($msisdn, $amount, $token) | |
{ | |
if($this->_billError500 == true) { | |
error_log(print_r('ha dado error 500', true)); |
NewerOlder