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
{ | |
"workbench.colorTheme": "Dracula", | |
"editor.fontSize": 18, | |
"editor.lineHeight": 24, | |
"editor.fontFamily": "'Fira Code', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'", | |
"editor.fontLigatures": true, | |
"editor.rulers": [ | |
80, | |
120 | |
], |
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
# ps -ef - disaply all processes | |
# grep apache2 - find the rows with apache | |
# grep -v grep - remove rows with the word grep | |
# awk '{print $2}' - get the second column of the previous output | |
# kill -9 $(..) - execute kill -9 on all the values returned from the previous pipes | |
kill -9 $(ps -ef |grep apache2 |grep -v grep| awk '{print $2}') |
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
- Criando uma instância AWS EC2 | |
- Sistema Operacional Amazon Linux AMI 2012.09.01 64bit | |
- Tipo t1.micro | |
- Zona : sa-east-1a | |
- Tags | |
- Name : seuNomeInstalacao | |
- Grupo de Segurança : seuGrupoSeguranca | |
- Portas abertas : 22(SSH), 80(HTTP), 3306(MYSQL) | |
- Chave de acesso : | |
E:\Reginaldo\Programas\suaChave.pem |
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
public $components = array( | |
'Session' | |
,'Mensagem' | |
,'Auth' => array( | |
'loginAction' => array( | |
'controller' => 'usuarios' | |
,'action' => 'login' | |
) | |
,'loginRedirect' => array( | |
'controller' => 'usuarios' |
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 webcal.engecal.teste www.webcal.engecal.teste; | |
access_log off; | |
error_log /var/log/nginx/webcal.log; | |
root /var/opt/app/current; | |
index index.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
public function shutdown( \Controller $controller ) { | |
if ( $this->_init ) { | |
$this->Pdf->WriteHTML( $controller->response->body() , 2 ); | |
$this->Pdf->Output( $this->_filename, $this->_output ); | |
exit(); | |
} |
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
$( '#MarcarTodos' ).live('click', function(){ | |
var tabela = $( this ).parent().parent().parent().parent(); | |
if ( this.checked === true ) { | |
tabela.find( ':checkbox' ).attr( 'checked', true ); | |
} else { | |
tabela.find( ':checkbox' ).attr( 'checked', false ); |
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
$dataSource = $this->getDataSource(); | |
$dataSource->begin(); | |
try { | |
$dataSource->commit(); | |
} catch( Exception $e ) { | |
$dataSource->rollback(); |
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 | |
class FiltroUsuarioBehavior extends ModelBehavior { | |
public function beforeFind(\Model $model, $queryData){ | |
if(AuthComponent::user("group_id") == 2){ | |
$queryData["conditions"] = array("User.id" => AuthComponent::user("id")); | |
} | |
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
jQuery.datepicker.regional['pt-BR'] = { | |
closeText: 'Fechar', | |
prevText: '<Anterior', | |
nextText: 'Próximo>', | |
currentText: 'Hoje', | |
monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho', | |
'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'], | |
monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun', | |
'Jul','Ago','Set','Out','Nov','Dez'], | |
dayNames: ['Domingo','Segunda-feira','Terça-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sábado'], |