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
# RESOLVENDO GOOGLE CHROME NO TERMINAL | |
sudo xattr -lr /Applications/Google\ Chrome.app | |
sudo xattr -cr /Applications/Google\ Chrome.app | |
sudo codesign -f -s - /Applications/Google\ Chrome.app |
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
node_modules | |
.git | |
.gitignore |
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
# Realiza o backup completo com estrutura, dados views, procedures, functions e triggers | |
# utilizando insert completo pela option --complete-insert | |
# alem de converter os binários para hexadecimal com a option --hex-blob | |
# inclui CREATE BATABASE option -B | |
mysqldump -u username -p --opt --complete-insert --hex-blob --routines -B databasename > databasename.sql | |
# Realiza o backup da estrutura tanto tables quanto views | |
# exclui as triggers otion --skip-triggers | |
# ignora os dados --no-data |
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
server { | |
listen 80 default_server; | |
listen [::]:80 default_server; | |
root /your/root/path; | |
index index.html; | |
server_name you.server.com; |
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
find . -name "*.t1" -exec bash -c 'mv "$1" "${1%.t1}".t2' - '{}' \; |
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 CONCAT("ALTER TABLE ", TABLE_NAME," CHARSET=utf8, COLLATE=utf8_general_ci;") AS ExecuteTheString | |
FROM INFORMATION_SCHEMA.TABLES | |
WHERE TABLE_SCHEMA="dababase" | |
AND TABLE_TYPE="BASE TABLE" |
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'; | |
(function($) { | |
window.ParsleyValidator | |
.addValidator('validcnpj', function (value, requirement) { | |
var cnpj = value.replace(/[^0-9]/g, '') | |
, len = cnpj.length - 2 | |
, numbers = cnpj.substring(0,len) | |
, digits = cnpj.substring(len) | |
, add = 0 |
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 | |
function serverUrl($requestUri = null) { | |
switch (true) { | |
case (isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on' || $_SERVER['HTTPS'] === true)): | |
case (isset($_SERVER['HTTP_SCHEME']) && ($_SERVER['HTTP_SCHEME'] == 'https')): | |
$scheme = 'https'; | |
break; | |
default: | |
$scheme = 'http'; |
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
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{HTTPS} off | |
# First rewrite to HTTPS: | |
# Don't put www. here. If it is already there it will be included, if not | |
# the subsequent rule will catch it. | |
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] | |
# Now, rewrite any request to the wrong domain to use www. | |
RewriteCond %{HTTP_HOST} !^www\. |
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
public class GsonRequest<T> extends Request<T> { | |
private Gson gson = new Gson(); | |
private Class<T> model; | |
private Map<String, String> params; | |
private Map<String, String> headers; | |
private Listener listener; | |
public GsonRequest(int method, String url, Class<T> model, Map<String, String> params, Map<String, String> headers, |
NewerOlder