{ "folders": [ { "file_exclude_patterns": [ "###SublimeText 2/3###", "/.sublime-project", ".sublime-workspace", "sftp-config*.json",
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
// jquery > 1.8 | |
$.expr[":"].contains = $.expr.createPseudo(function(arg) { | |
return function( elem ) { | |
return $(elem).text().toUpperCase().indexOf(arg.toUpperCase()) >= 0; | |
}; | |
}); | |
//---uso | |
$("div:contains('John')") |
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 | |
mkdir /tmp/adodefont | |
cd /tmp/adodefont | |
wget https://github.com/adobe-fonts/source-code-pro/archive/1.017R.zip | |
unzip 1.017R.zip | |
mkdir -p ~/.fonts | |
cp source-code-pro-1.017R/OTF/*.otf ~/.fonts | |
fc-cache -f -v |
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
-- 1. Para atualizar o endereço antigo do blog para o novo endereço execute (lembre de colocar os seus dados no campo em negrito): | |
UPDATE wp_options SET option_value = replace(option_value, 'http://siteantigo.com', 'http://sitenovo.com') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
-- 2. O segundo passo é atualizar o endereço dos posts. Para isso, execute: | |
UPDATE wp_posts SET guid = replace(guid, 'http://siteantigo.com','http://sitenovo.com'); | |
-- 3. Agora atualize o conteúdo do blog para qualquer eventual endereço do blog nos textos. | |
UPDATE wp_posts SET post_content = replace(post_content, 'http://siteantigo.com', 'http://sitenovo.com'); |
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
-- Alterando os caminhos absolutos da URL do site (‘siteurl’) e URL da home (homeurl’) | |
UPDATE wp_options | |
SET option_value = REPLACE(option_value, | |
'http://www.siteantigo.com.br', 'http://www.sitenovo.com.br') | |
WHERE option_name = 'home' | |
OR option_name = 'siteurl'; | |
-- Alterar GUID |
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
function redirect($url) | |
{ | |
if (!headers_sent()) | |
{ | |
header('Location: '.$url); | |
exit; | |
} | |
else | |
{ | |
echo '<script type="text/javascript">'; |
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
function mask($val, $mask) { | |
$maskared = ''; | |
$k = 0; | |
for($i = 0; $i<=strlen($mask)-1; $i++) | |
{ | |
if($mask[$i] == '#') | |
{ | |
if(isset($val[$k])) | |
$maskared .= $val[$k++]; | |
} |
Boas práticas na hora do commit Para fácil identificação e resolução de problemas adotaremos o seguinte padrão para todos os commits. Ações básicas - obrigatórias: [ADD] - Sempre que adicionar arquivos, métodos em classes, funções, recursos, ou seja, tudo que for novo deverá ser informado. [ADD]
- wsException:
- Adicionado Método identificador de Código de Erro.
- Adicionado Método que Obtém o BackTrace.
- wsMessage:
- Gerenciamento Mensagens exibidas: Erros, Alertas e Informações.
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
{ | |
"always_prompt_for_file_reload": false, | |
"always_show_minimap_viewport": false, | |
"animation_enabled": true, | |
"atomic_save": true, | |
"auto_close_tags": true, | |
"auto_complete": true, | |
"auto_complete_commit_on_tab": true, | |
"auto_complete_delay": 50, | |
"auto_complete_selector": "source - comment, meta.tag - punctuation.definition.tag.begin", |
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 function lmWord($string, $words = '100'){ | |
$count = strlen($string); | |
if($count <= $words){ | |
return $string; | |
}else{ | |
$strpos = strrpos(substr($string,0,$words),' '); | |
return substr($string,0,$strpos).'...'; | |
} | |
} ?> |