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
#Processo recebe o local do arquivo, e onde será salvo o novo arquivo | |
hyphen = proc { |from, to| | |
#Cria um novo arquivo de texto | |
text = File.new( to ,'w') | |
#Salva no novo arquivo de texto o conteúdo do (arquivo com as vogais) alterado pela Regexp | |
text.puts File.read( from ).gsub(/[aeiou]/i,"-") | |
#Fecha o arquivo | |
text.close | |
} | |
#Chama o processo passando os argumentos pelo terminal |
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
{ | |
"estados": [ | |
{ | |
"sigla": "AC", | |
"nome": "Acre", | |
"cidades": [ | |
"Acrelândia", | |
"Assis Brasil", | |
"Brasiléia", | |
"Bujari", |
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
installEssentials(){ | |
sudo apt-get update && sudo apt-get --force-yes install curl python-software-properties python g++ make build-essential libssl-dev libcurl4-gnutls-dev libexpat1-dev gettext unzip arj cabextract file-roller mpack p7zip p7zip-full p7zip-rar rar sharutils unace unace-nonfree unrar unzip uudeview zip preload youtube-dl && youtube-dl -U | |
} && installEssentials | |
installGit(){ | |
sudo apt-get update && sudo apt-get --force-yes install git | |
} && installGit | |
installNode(){ | |
curl --silent --location https://deb.nodesource.com/setup_0.12 | sudo bash - |
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
decodeURIComponent(ytplayer.config.args['url_encoded_fmt_stream_map']).split(',').map(function(url){return [url.replace(/.+https/,'https'),url.replace(/.+\?/,'').split('&').pop().split(';').shift()];}).filter(function(link,i){ return (/^https/).test(link[0]) ? link: null; }); |
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 | |
# codecs-raring.sh | |
# Criado: Sab 27/abr/2013 hs 16h | |
# Last Change: Sab 27/abr/2013 hs 16h | |
# autor: Sérgio Luiz Araújo Silva | |
# site: http://vivaotux.blogspot.com | |
# twitter: http://www.twitter.com/voyeg3r | |
# email: <voyeg3r gmail.com> | |
# baseado nos scripts https://gist.github.com/voyeg3r/3921102 | |
# https://gist.github.com/1285188 |
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
# Install Mysql | |
sudo apt-get install mysql-server | |
sudo mysql_secure_installation | |
sudo mysql_install_db | |
# Add PHP lastest versions repository | |
sudo add-apt-repository ppa:ondrej/php | |
# Update packages ppa | |
sudo apt-get update |
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
class Graph { | |
constructor(){ | |
this.nodes = []; | |
this.edges = []; | |
} | |
addNode( node ){ | |
if( !this.hasNode(node) ) | |
this.nodes.push(node); |
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
const textao = ` | |
SECRETARIA DE POLÍTICAS DE PROMOÇÃO | |
DA IGUALDADE RACIAL | |
DECRETOS DE 1o | |
- DE JANEIRO DE 2015 | |
A PRESIDENTA DA REPÚBLICA, no uso da atribuição | |
que lhe confere o art. 84, caput, inciso I, da Constituição, resolve | |
EXONERAR | |
LUIZA HELENA DE BAIRROS do cargo de Ministra de Estado | |
Chefe da Secretaria de Políticas de Promoção da Igualdade Racial da |
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
const text = "4.1. EDITAL - CORREGEDORIA GERAL DA JUSTIÇA\nAVISO DE INTIMAÇÃO (Corregedoria Geral da Justiça de TERESINA)\nProcesso nº 0001107-87.2014.8.18.0139\nClasse: Reclamação Disciplinar\nRequerente: IGREJA ASSEMBLEIA DE DEUS DO DIRCEU DOIS\nAdvogado(s):\nRequerido: JOSÉ RAMOS DIAS FILHO, JUIZ DE DIREITO DA 2ª VARA CÍVEL DA COMARCA DE TERESINA-PI\nAdvogado(s): MOISÉS ÂNGELO DE MOURA REIS (OAB/PI Nº 874/75)\nDECISÃO: Em face do exposto,determino o arquivamento do presente expediente. Comunique-se à Corregedoria Nacional de Justiça, no prazo\nde quinze dias,sobre a presente decisão. Intimações necessárias. Teresina-PI, 19 de junho de 2017. Des. Brandão de Carvalho, Decano.\n5. FERMOJUPI/SECOF"; | |
class NLPJS { | |
static regex = { | |
numericTitle: /^(\d+\.)+\s[A-Z]+/ | |
} | |
static _cleanText(text){ | |
return text.replace(/\s{2,}/, ' '); |