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 | |
return PhpCsFixer\Config::create() | |
->setRules(array( | |
'@Symfony' => true, | |
'@PSR1' => true, | |
'@PSR2' => true, | |
'yoda_style' => false, | |
'binary_operator_spaces' => true, | |
'blank_line_after_namespace' => true, |
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 bash | |
# Upgrade an Amazon Linux EC2 to PHP 7.3 | |
# | |
# Last tested w/ PHP 7.2 AWS Linux version 2.8.5 | |
# | |
# Must be ran as sudo: | |
# sudo bash upgrade-php7.sh | |
# | |
# Can be added to ./.ebextensions/20_php.config like so: | |
# container_commands: |
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
{ | |
"breadcrumbs.enabled": true, | |
"editor.codeActionsOnSave": { | |
"source.fixAll": true | |
}, | |
"editor.fontFamily": "Fira Code", | |
"editor.fontLigatures": true, | |
"editor.fontWeight": "400", | |
"editor.formatOnType": false, | |
"editor.lineHeight": 22, |
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
```sh | |
#!/bin/bash | |
sed '/INSERT INTO `rev_reviews`/d' dump.sql | | |
sed '/INSERT INTO `rev_log`/d' | | |
sed '/INSERT INTO `p_logconsulta`/d' | | |
sed '/INSERT INTO `p_logconsulta_20190726`/d' | | |
sed '/INSERT INTO `rev_log_products`/d' | | |
sed '/INSERT INTO `rev_log_tasks`/d' | | |
sed '/INSERT INTO `rev_log_products_client`/d' | |
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
return ( | |
<Container> | |
<Badge onClick={handleToggleVisible} hasUnread={hasUnread}> | |
<MdNotifications color="#7159c1" size={20} /> | |
</Badge> | |
<NotificationList visible={visible}> | |
<Scroll> | |
{notifications.map(notification => ( | |
<Notification key={notification._id} unread={!notification.read}> |
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
{ | |
"jsx-a11y/label-has-associated-control": [ 2, { | |
"required": { | |
"some": [ "nesting", "id" ] | |
} | |
}] | |
} |
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 | |
// example: https://maps.googleapis.com/maps/api/place/findplacefromtext/json?input=YOUR_PLACE_OR_ADDRESS_HERE,YOUR_CITY_HERE%2C+TO%2C+Brasil&inputtype=textquery&fields=photos,formatted_address,name,rating,opening_hours,geometry&key=YOUR_KEY_HERE | |
function cleanString($string) { | |
$string = str_replace('&','e', $string); | |
$string = str_replace("'",'', $string); | |
return $string; | |
} | |
function geocode($place, $city){ |
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
// Place your key bindings in this file to override the defaultsauto[] | |
[ | |
{ | |
"key": "ctrl+k", | |
"command": "workbench.action.terminal.clear", | |
"when": "terminalFocus", | |
}, | |
{ | |
"key": "ctrl+tab", | |
"command": "workbench.action.terminal.focusNext", |
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
{ | |
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe", | |
"terminal.integrated.shellArgs.windows": [ | |
"-l", | |
"-i" | |
], | |
"workbench.editor.enablePreview": false, | |
"emmet.includeLanguages": { | |
"blade": "html", | |
"javascript": "javascriptreact" |
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 | |
$stores = DB::table('stores as s') | |
->leftJoin('products as p', 'p.store_id', '=', 's.id') | |
->leftJoin('coupons as c', 'c.product_id', '=', 'p.id') | |
->leftJoin('coupon_user as cp', function($join) { | |
$join->on('cp.coupon_id', '=', 'c.id') | |
->on('cp.used', '=', DB::raw(1)); | |
}) | |
->leftJoin('coupons as c2', 'c2.product_id', '=', 'p.id') |