Skip to content

Instantly share code, notes, and snippets.

<!--filter>
<filter-name>CorsFilter</filter-name>
<filter-class>com.jaspersoft.jasperserver.api.security.csrf.CorsFilter</filter-class>
</filter-->
<filter>
<filter-name>CorsFilter</filter-name>
<filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
<init-param>
<param-name>cors.allowed.origins</param-name>
<param-value>https://www.example.com, https://www.example.net</param-value>
@bytefade
bytefade / comandos.md
Last active October 15, 2021 16:05
Comandos e ferramentas básicas para rodar projeto

#Instalações na plataforma windows

  • Visual Studio Code, editor para programar
  • Nodejs, compilador de JS e servidor
  • Yarn, gerenciador de pacotes do projeto
  • Git, controle de versão do código fonte do projeto

#Principais comandos do GIT

  • git clone, faz cópia de um projeto para a máquina local
  • git status, verifica a situação dos arquivos do projeto
  • git log, verifica o histórico do projeto "todos os commits"
@bytefade
bytefade / tinker.php
Created August 7, 2020 16:50
tinker call controller
❯ php artisan tinker
Psy Shell v0.10.4 (PHP 7.4.5 — cli) by Justin Hileman
>>> $controller = app()->make('path/to/controller');
=> path/to/controller {#4224
+successStatus: 200,
+valor: 199,
}
>>> app()->call([$controller, 'method'], ['variable' => item]);
=> null
>>> app()->call([$controller, 'method'], ['variable' => 'item']);
@bytefade
bytefade / oh-my-zsh.sh
Created August 4, 2020 00:42
oh my zsh terminal app
source /path/to/antigen.zsh
eval "$(starship init zsh)"
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
# Load the oh-my-zsh's library.
antigen use oh-my-zsh
# Bundles from the default repo (robbyrussell's oh-my-zsh).
antigen bundle git
@bytefade
bytefade / mq.css
Created April 14, 2020 12:36
Media Queries
/* Media Queries
–––––––––––––––––––––––––––––––––––––––––––––––––– */
/*
Note: The best way to structure the use of media queries is to create the queries
near the relevant code. For example, if you wanted to change the styles for buttons
on small devices, paste the mobile query code up in the buttons section and style it
there.
*/
@bytefade
bytefade / tct.txt
Created April 4, 2020 20:56
Total Commit in Terminal
git log --oneline --all | wc -l
@bytefade
bytefade / css-mobile-part.css
Created June 25, 2019 18:18
Programar para mobile parte por parte, altear 1n+1, 1n+2... quais seções vc quer ocultar.
section:nth-child(1n+4){display: none;}
<IfModule mod_rewrite.c>
RewriteEngine on
#
# stuff to let through (ignore)
RewriteCond %{REQUEST_URI} "/folder1/" [OR]
RewriteCond %{REQUEST_URI} "/folder2/"
RewriteRule (.*) $1 [L]
@bytefade
bytefade / url_whatsapp.php
Created April 30, 2019 18:18
Display URL WEB/API
<?php
// Verificar se é mobile
$iphone = strpos($_SERVER['HTTP_USER_AGENT'],"iPhone");
$android = strpos($_SERVER['HTTP_USER_AGENT'],"Android");
$palmpre = strpos($_SERVER['HTTP_USER_AGENT'],"webOS");
$berry = strpos($_SERVER['HTTP_USER_AGENT'],"BlackBerry");
$ipod = strpos($_SERVER['HTTP_USER_AGENT'],"iPod");
if ($iphone || $android || $palmpre || $ipod || $berry == true)
{
/* Habilitar diferente URL do WhatsApp conforme o dispositivo,
{
"editor.fontFamily": "Hasklig",
"files.autoSave": "onFocusChange",
"workbench.colorTheme": "Monokai",
"window.zoomLevel": 0,
"workbench.sideBar.location": "left",
"workbench.statusBar.feedback.visible": false,
"zenMode.hideStatusBar": false,
"workbench.statusBar.visible": false,
"explorer.openEditors.visible": 0,