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-FPM aliases | |
alias php-fpm.start="launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.php56.plist" | |
alias php-fpm.stop="launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.php56.plist" | |
alias php-fpm.restart='php-fpm.stop && php-fpm.start' | |
## NGINX aliases | |
alias nginx.start='sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.nginx.plist' | |
alias nginx.stop='sudo launchctl unload /Library/LaunchDaemons/homebrew.mxcl.nginx.plist' | |
alias nginx.restart='nginx.stop && nginx.start' |
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
# /usrl/local/etc/nginx/conf.d/php-fpm | |
location ~ \.php$ { | |
try_files $uri $uri/ /index.php?$query_string = 405; | |
stcgi_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_pass 127.0.0.1:9000; | |
fastcgi_index index.php; | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_intercept_errors off; |
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/local/etc/nginx/nginx.conf | |
worker_processes 1; | |
error_log /usr/local/etc/nginx/logs/error.log debug; | |
events { | |
worker_connections 256; | |
} |
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/local/etc/nginx/sites-available/default | |
server { | |
listen 80; | |
server_name localhost; | |
root /usr/local/var/www/; | |
access_log /usr/local/etc/nginx/logs/default.access.log main; | |
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
# /usr/local/etc/nginx/sites-available/default-ssl | |
server { | |
listen 443; | |
server_name localhost; | |
root /usr/local/var/www/; | |
access_log /usr/local/etc/nginx/logs/default-ssl.access.log main; | |
ssl on; |
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-FPM aliases | |
alias php-fpm.start='launchctl load -w /usr/local/opt/php56/homebrew.mxcl.php56.plist' | |
alias php-fpm.stop='launchctl unload -w /usr/local/opt/php56/homebrew.mxcl.php56.plist' | |
alias php-fpm.restart='php-fpm.stop && php-fpm.start' | |
## NGINX aliases | |
alias nginx.start='sudo launchctl load /usr/local/opt/nginx/homebrew.mxcl.nginx.plist' | |
alias nginx.stop='sudo launchctl unload /usr/local/opt/nginx/homebrew.mxcl.nginx.plist' | |
alias nginx.restart='nginx.stop && nginx.start' |
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 | |
namespace App\Http\Controllers; | |
use App\Http\Requests; | |
use Illuminate\Http\Request; | |
use Illuminate\Support\Facades\Session; | |
class FooController extends Controller | |
{ |
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
# EXIBE REGRAS ATIVAS | |
# -n : usa números ao invés de nomes de portas | |
# -v : exibe estatísticas | |
# -L : lista regras ativas | |
iptables -nvL | |
# Altera a política padrão da chain FORWARD | |
iptables -P FORWARD DROP |
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 python3 | |
seconds = input("Por favor, entre com o número de segundos que deseja converter: ") | |
seconds = int(seconds) | |
day = 86400 | |
hour = 3600 | |
minute = 60 | |
days = seconds // day |
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/python | |
lloyd = { | |
"name": "Lloyd", | |
"homework": [90.0, 97.0, 75.0, 92.0], | |
"quizzes": [88.0, 40.0, 94.0], | |
"tests": [75.0, 90.0] | |
} | |
alice = { | |
"name": "Alice", |
OlderNewer