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; | |
server_name git.local; | |
rewrite ^(.*) https://git.local$1 permanent; | |
} | |
server { | |
listen 443; | |
ssl on; |
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
alias c='clear' | |
alias tarc='tar -zcvf' | |
alias tard='tar -zxvf' | |
alias vi='nano' | |
alias edit='nano' | |
alias update='apt-get update && apt-get upgrade' | |
alias nreload='sudo service nginx restart' |
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
402 Payment Required | |
200 OK | |
Standard response for successful HTTP requests. The actual response will depend on the request method used. In a GET request, the response will contain an entity corresponding to the requested resource. In a POST request the response will contain an entity describing or containing the result of the action. | |
204 No Content | |
The server successfully processed the request, but is not returning any content. | |
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
# Reset | |
Color_Off="\[\033[0m\]" # Text Reset | |
# Regular Colors | |
Black="\[\033[0;30m\]" # Black | |
Red="\[\033[0;31m\]" # Red | |
Green="\[\033[0;32m\]" # Green | |
Yellow="\[\033[0;33m\]" # Yellow | |
Blue="\[\033[0;34m\]" # Blue | |
Purple="\[\033[0;35m\]" # Purple |
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
UIStoryboard *sb = self.storyboard; | |
LoginViewController *loginWindow = (LoginViewController *)[sb instantiateViewControllerWithIdentifier:@"LoginWindow"]; | |
[self presentViewController:loginWindow animated:YES completion:nil]; |
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
# change root password (pass '' to remove password) | |
mysqladmin -u root -p'old_password' password 'new_password' | |
# Log with user bonates just using database database_name: | |
mysql -u bonates -p simple_cms_development | |
# create an user and give him all access to a table | |
GRANT ALL PRIVILEGES ON table_name.* to 'user_name'@'localhost' identified by 'user_password'; |
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 | |
################################################## | |
# | |
# Arquivos que devem estar neste diretório | |
# | |
# rm info.php.txt | |
# rm install.sh | |
# rm iptables_basic.txt | |
# rm jail.local.txt | |
# rm phpmyadmin-https-server.txt |
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
# HTTPS server | |
# | |
server { | |
listen 443; | |
server_name localhost; | |
root html; | |
index index.html index.htm; | |
ssl on; |
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
# install Command Line Tools for Xcode (*** if not yet!) | |
#Install Homebrew | |
$ ruby <(curl -fsSkL raw.github.com/mxcl/homebrew/go) | |
# Add Homebrews binary path to the front of the $PATH | |
$ echo "export PATH=/usr/local/sbin:$PATH" >> ~/.bash_profile | |
$ source ~/.bash_profile | |
# checar instalação do homebrew e possíveis pendências: |
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
#TODO: Adicionar o arquivo com o script local, que deve ser executado antes deste. | |
echo "remote ip:" | |
read TARGETIP | |
# generating keys | |
ssh-keygen -q -t rsa -f ~/.ssh/id_rsa -N "" | |
# sending to remote server (as root) | |
scp ~/.ssh/id_rsa.pub root@$TARGETIP: |
OlderNewer