Acesse o seu arquivo app/Providers/AppServiceProvider.php
, e no método register
adicione o seguinte :
/**
* Register any application services.
*
* @return void
*/
# Matches patterns such as: | |
# https://www.facebook.com/my_page_id => my_page_id | |
# http://www.facebook.com/my_page_id => my_page_id | |
# http://www.facebook.com/#!/my_page_id => my_page_id | |
# http://www.facebook.com/pages/Paris-France/Vanity-Url/123456?v=app_555 => 123456 | |
# http://www.facebook.com/pages/Vanity-Url/45678 => 45678 | |
# http://www.facebook.com/#!/page_with_1_number => page_with_1_number | |
# http://www.facebook.com/bounce_page#!/pages/Vanity-Url/45678 => 45678 | |
# http://www.facebook.com/bounce_page#!/my_page_id?v=app_166292090072334 => my_page_id | |
# http://www.facebook.com/my.page.is.great => my.page.is.great |
<?php | |
class BlogController extends Controller | |
{ | |
/** | |
* Posts | |
* | |
* @return void | |
*/ | |
public function showPosts() |
#!/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 |
<?php | |
/** | |
* Query builder scope to list neighboring locations | |
* within a given distance from a given location | |
* | |
* @param Illuminate\Database\Query\Builder $query Query builder instance | |
* @param mixed $lat Lattitude of given location | |
* @param mixed $lng Longitude of given location | |
* @param integer $radius Optional distance |
function deleteRows() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var rows = sheet.getDataRange(); | |
var numRows = rows.getNumRows(); | |
var values = rows.getValues(); | |
var rowsDeleted = 0; | |
for (var i = 0; i <= numRows - 1; i++) { | |
var row = values[i]; | |
if (row[0] == 'delete' || row[0] == '') { // This searches all cells in columns A (change to row[1] for columns B and so on) and deletes row if cell is empty or has value 'delete'. |
// Exemplo de requisição GET | |
var ajax = new XMLHttpRequest(); | |
// Seta tipo de requisição e URL com os parâmetros | |
ajax.open("GET", "minha-url-api.com/?name=Henry&lastname=Ford", true); | |
// Envia a requisição | |
ajax.send(); | |
// Cria um evento para receber o retorno. |
sentry
SENTRY_SECRET_KEY
to random 32 char stringdocker-compose up -d
docker-compose exec sentry sentry upgrade
to setup database and create admin userdocker-compose exec sentry pip install sentry-slack
if you want slack plugin, it can be done laterdocker-compose restart sentry
9000
/** | |
* Function to replace text in Google Slides with Google Sheet values | |
* @reference https://hudsonatwell.co/2020/10/03/how-to-use-google-slides-to-autogenerate-featured-images/ | |
*/ | |
function generate_featured_image() { | |
/* get spreadsheet from public view link */ | |
var dataSpreadsheetUrl = "https://docs.google.com/spreadsheets/d/1necmbNPUsGJ3fwNiFpgNLbtH6c2RmJDwIQCPuhAfA7s/edit"; //make sure this includes the '/edit at the end | |
var ss = SpreadsheetApp.openByUrl(dataSpreadsheetUrl); | |