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
cat /var/log/nginx/access.log | awk '{print $8}' | awk -F '/' '{print $4}' | awk -F 'e' '{print $1}' | sort | uniq -c | sort -n |
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
cat /var/log/nginx/access.log | awk '{print $8}' | awk -F '/' '{print $4}' | awk -F 'e' '{print $1}' | sort | uniq -c | sort -n |
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
#Amazon Linux | |
vi /etc/sysconfig/network | |
hostname vm-hostname |
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
#1 OK | |
Input: 5,5 | |
Commands: L,L,N,N,L,L | |
Output: 9,3 | |
#2 MARGEM ESQ | |
Input: 1,1 | |
Commands: O,O,S,S | |
Output: Coordenada (1) Invalida |
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
#Using Case-sentive or Non Case-sensitive filesystem | |
# Bitbucket tutorial https://www.atlassian.com/git/tutorials/migrating-prepare | |
java -jar ~/svn-migration-scripts.jar authors http://SVN_URL:SVN_PORT/svn/<PATH>/trunk/<repo-name> <svn_user> <svn_password> > /tmp/authors.txt | |
git svn clone --trunk=./ --authors-file=/tmp/authors.txt http://SVN_URL:SVN_PORT/svn/<PATH>/trunk/<repo-name> /tmp/<git_repo_name> | |
#Using Docker - https://hub.docker.com/r/yukinagae/svn-to-git | |
docker pull yukinagae/svn-to-git |
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
file=File.new('/tmp/Mix.csv') | |
while (line = file.gets) | |
parts = line.split("\;") | |
puts("DELETE FROM cadastrocustomizavelvalor WHERE cdv_identificadoralternativo = '#{parts[0]}_mix_#{parts[1]}' and cdv_cli_codigo = 14100 and cad_codigo = 96411;") | |
end | |
file.close |
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; | |
server_name alias.dominio.com 127.0.0.1; | |
proxy_redirect off; | |
proxy_buffering off; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
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
$('pre').textContent.split(" ").forEach(function(element){ if(element.startsWith('api')){console.log("curl -XDELETE 'URL_TO_API_SEARCH/"+element+" && echo")} }); |
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
// https://ip-ranges.amazonaws.com/ip-ranges.json | |
JSON.parse($('pre').textContent).prefixes.forEach(function(entry){ console.log(entry.ip_prefix);}) |
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
system("sed -i '1iNEW_TEXT' EXISTING_FILE.TXT") |
NewerOlder