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 | |
set -e | |
### BEGIN INIT INFO | |
# Provides: unicorn | |
# Required-Start: $all | |
# Required-Stop: $network $local_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 |
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
################################################################################ | |
# unicorn.sh | |
################################################################################ | |
#!/usr/bin/env bash | |
set -e | |
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games | |
AS_USER="USER_NAME" |
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
# Postgresql | |
# https://wiki.postgresql.org/wiki/Apt | |
#Quickstart | |
#Create /etc/apt/sources.list.d/pgdg.list. The distributions are called codename-pgdg. In the example, replace wheezy with the actual #distribution you are using: | |
deb http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg main | |
#(You may determine the codename of your distribution by running lsb_release -c.) | |
#Import the repository key from https://www.postgresql.org/media/keys/ACCC4CF8.asc, update the package lists, and start installing #packages: |
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
set -s escape-time 1 | |
bind r source-file ~/.tmux.conf \; display "Reloaded!" | |
# splitting panes | |
# START:panesplit | |
bind | split-window -h | |
bind - split-window -v | |
# END:panesplit | |
# moving between panes |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8 /> | |
<title></title> | |
<link rel="stylesheet" type="text/css" media="screen" href="" /> | |
<script type="text/javascript" src=""></script> | |
</head> | |
<body> |
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
Cookies: | |
http://php.net/manual/pt_BR/features.cookies.php | |
Session: | |
http://php.net/manual/pt_BR/book.session.php | |
Arrays: |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8 /> | |
<title>Contador de Visitas</title> | |
</head> | |
<body> | |
<?php |
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
1. Criar banco de dados <usuario>_access_log | |
2. Criar tabela dentro do banco de dados: log | |
3. Crie uma pasta no xampp | |
4. Crie um arquivo chamado access_log.php | |
5. Conectar ao banco de dados | |
6. Inserir registro do Log atual | |
7. Pesquisar todos os logs | |
8. Exibir todos os logs como uma tabela |
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
<?php | |
$senha = 'Of!cinaDePr0gramaçã0'; | |
$hash = password_hash($senha, PASSWORD_DEFAULT); | |
$salt = substr($hash, 7, 22); | |
$verificacao = password_verify($senha, $hash) ? "Verdadeiro" : "Falso"; | |
$teste_falso = password_verify("N@oEhaSenha", $hash) ? "Verdadeiro" : "Falso"; |
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
<?php | |
/* Turma de Oficina de Programação - 18h15 | |
29/05/2015 | |
Encurtador de URLs | |
*/ | |
$url = $_POST["url"]; | |
function imprime_url(){ |
OlderNewer