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
#!/bin/sh | |
# Retrieve author information as Git sees it while commiting | |
AUTHORINFO=$(git var GIT_AUTHOR_IDENT) || exit 1 | |
NAME=$(printf '%s\n' "${AUTHORINFO}" | sed -n 's/^\(.*\) <.*$/\1/p') | |
EMAIL=$(printf '%s\n' "${AUTHORINFO}" | sed -n 's/^.* <\(.*\)> .*$/\1/p') | |
printf "AUTHORINFO: %s\n" "${AUTHORINFO}" | |
printf "NAME: %s\n" "${NAME}" | |
printf "EMAIL: %s\n" "${EMAIL}" |
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
git filter-branch --env-filter ' | |
OLD_EMAIL="[email protected]" | |
CORRECT_NAME="Seu nome" | |
CORRECT_EMAIL="[email protected]" | |
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ] | |
then | |
export GIT_COMMITTER_NAME="$CORRECT_NAME" | |
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL" | |
fi | |
if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ] |
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
HTML.query('input[checked=checked]').each(function(el, li, all) { | |
console.log(el.value); | |
}); | |
var itens = [1, 270, 327, 112, 111, 107, 293, 328, 110, 326, 175, 174, 289, 286, 291, 288, 285, 290, 170, 294, 312, 173, 261, 318, 325, 80, 85, 83, 79, 81, 311, 82, 296, 224, 220, 225, 223, 219, 231, 227, 232, 230, 226, 228, 229, 221, 222, 238, 234, 239, 237, 233, 245, 241, 246, 244, 240, 242, 243, 297, 235, 236, 252, 248, 253, 251, 247, 298, 259, 255, 260, 258, 254, 256, 257, 249, 250, 303, 299, 302, 304, 306, 300, 305, 307, 309, 301, 308, 310, 292, 262, 295, 316, 315]; | |
$.each(itens, function(index, value) { | |
$('input[value=' + value +']').attr('checked', 'checked'); | |
}); |
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
#!/bin/sh | |
unset $(git rev-parse --local-env-vars) | |
echo '' | |
echo '[SSH] Connecting in site.iab.hml...' | |
ssh -i /home/ubuntu/.ssh/ANOTHER_SERVER_PEM.pem ubuntu@IP_FROM_ANOTHER_SERVER <<'ENDSSH' | |
echo '[IN] Connected!' | |
echo '[IN] Listing directories...' | |
to | |
ls -liah |
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
# fastcgi_cache_path /var/run/nginx-cache levels=1:2 keys_zone=WORDPRESS:25m inactive=1440m; | |
# fastcgi_cache_key "$scheme$request_method$host$request_uri"; | |
# fastcgi_cache_use_stale error timeout invalid_header http_500; | |
# fastcgi_ignore_headers Cache-Control Expires Set-Cookie; | |
server { | |
listen 80; | |
root /var/www/html/pasta_do_wordpress; | |
index index.php index.html index.htm; | |
server_name dominiodosite.com.br; |
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
Show hidden characters
{ | |
// Example for: | |
// - Windows 7 | |
// - With phpcs and php-cs-fixer support | |
// We want debugging on | |
"show_debug": true, | |
// Only execute the plugin for php files | |
"extensions_to_execute": ["php"], |
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
Quick tip for handling CSRF Token Expiration - common issue is when you use csrf protection is that if | |
a form sits there for a while (like a login form, but any the same) the csrf token in the form will | |
expire & throw a strange error. | |
Handling it is simple, and is a good lesson for dealing with other types of errors in a custom manner. | |
In Middleware you will see a file VerifyCsrfToken.php and be tempted to handle things there. DON'T! | |
Instead, look at your app/Exceptions/Handler.php, at the render($request, Exception $e) function. | |
All of your exceptions go through here, unless you have excluded them in the $dontReport array at the |
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
{ | |
"auto_complete_commit_on_tab": true, | |
"auto_complete_selector": "source, text", | |
"auto_complete_with_fields": true, | |
"caret_style": "phase", | |
"close_windows_when_empty": false, | |
"default_line_ending": "unix", | |
"dpi_scale": 2.0, | |
"draw_minimap_border": true, | |
"ensure_newline_at_eof_on_save": 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
{ | |
aluno: "Andryan Charllys Cardoso Da Silva Dos Santos " | |
aluno_id: "2607" | |
cidade: "Jequiá da Praia" | |
escola: "Escola Municipal de Educação Básica José Calazans de Medeiros" | |
escola_id: "379" | |
estado: "AL" | |
mundos: Object | |
mundo1: Object | |
habilidades: Object |
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
#!/bin/bash | |
# Build latest version of Emacs, version management with stow | |
# OS: Ubuntu 14.04 LTS | |
# version: 24.5 | |
# Toolkit: lucid | |
# Warning, use updated version of this script in: https://github.com/favadi/build-emacs | |
set -e |