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
commands: | |
set_time_zone: | |
command: ln -f -s /usr/share/zoneinfo/America/Sao_Paulo /etc/localtime | |
Files: | |
"/etc/php.d/sp-timezone.ini" : | |
mode: "000644" | |
owner: root | |
group: root | |
content: | | |
date.timezone = America/Sao_Paulo |
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 | |
# Adicione um novo remote; pode chamá-lo de "upstream": | |
git remote add upstream https://github.com/usuario/projeto.git | |
# Obtenha todos os branches deste novo remote, | |
# como o upstream/master por exemplo: | |
git fetch upstream |
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
'use strict'; | |
var Promise = require('bluebird'); | |
var AWS = require('aws-sdk'); | |
// Check if environment supports native promises | |
if (typeof Promise === 'undefined') { | |
AWS.config.setPromisesDependency(require('bluebird')); | |
} |
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
"use strict"; | |
console.log("AWS Lambda SES Forwarder // @arithmetric // Version 3.0.0"); | |
// Configure the S3 bucket and key prefix for stored raw emails, and the | |
// mapping of email addresses to forward from and to. | |
// | |
// Expected keys/values: | |
// - fromEmail: Forwarded emails will come from this verified address | |
// - emailBucket: S3 bucket name where SES stores emails. |
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
packages: | |
yum: | |
newrelic-php5: [] | |
php56-imap: [] | |
rpm: | |
newrelic: http://yum.newrelic.com/pub/newrelic/el5/x86_64/newrelic-repo-5-3.noarch.rpm | |
commands: | |
configure_new_relic: | |
command: newrelic-install install | |
env: |
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
commands: | |
create_post_dir: | |
command: "mkdir /opt/elasticbeanstalk/hooks/appdeploy/post" | |
ignoreErrors: true | |
files: | |
"/opt/elasticbeanstalk/hooks/appdeploy/post/99_create_cron_jobs.sh": | |
mode: "000755" | |
owner: root | |
group: root | |
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
<?php | |
class UserRepository { | |
/** | |
* Create new user in database | |
* @return \App\User User Instance | |
*/ | |
public static function firstOrCreate(){ | |
// logic | |
return User::firstOrCreate([ |
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 | |
$string = 'http://meusite.com.br/wp-admin.php'; | |
$BlackListURL = ["wp-admin.php", "admin", "administrator", "wp-login.php"]; | |
/** Procure por uma parte da string no texto **/ | |
function hasString($search, $text, &$found) { | |
if (!is_array($search)) { | |
$search = [ |
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 | |
$dates = [ | |
'07/04/2016', # 0 | |
'08/04/2016', # 1 | |
'09/04/2016', # 2 | |
'10/04/2016', # 3 | |
'11/04/2016', # 4 | |
'12/04/2016', # 5 | |
'13/04/2016', # 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
SELECT | |
users.name, | |
chars.*, | |
guild.name as 'guild_name' | |
FROM | |
char_wstats as chars | |
JOIN pvpm_data as users ON chars.char_id = users.id | |
JOIN guild ON chars.char_id = guild.char_id | |
ORDER BY | |
chars.kill_count DESC |