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
| Amazon Linux | |
| - yum install tzdata | |
| - vi /etc/sysconfig/clock | |
| America/Sao_Paulo | |
| - sudo ln -sf /usr/share/zoneinfo/America/Sao_Paulo /etc/localtime | |
| - zdump -v /etc/localtime |grep 2017 | |
| CentOS | |
| - yum install tzdata |
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
| require 'pony' | |
| # GMAIL | |
| Pony.options = {:via => :smtp, :to => 'fulano@domain.com', :via_options => { :address => 'smtp.gmail.com', :port => '587', :enable_starttls_auto => true, :user_name => 'ciclano@domain.com', :password => '******', :authentication => :plain, :domain => 'localhost.localdomain'} } | |
| Pony.mail(:subject => 'subject' ,:body => 'body') | |
| # AWS/SES | |
| Pony.options = {:via => :smtp, :from => 'verified-email@domain.com', :to => 'fulano@domain.com', :via_options => { :address => 'AWS-ENDPOINT', :port => '587', :enable_starttls_auto => true, :user_name => '*****', :password => '******', :authentication => :plain, :domain => 'localhost.localdomain'} } | |
| Pony.mail(:subject => 'subject' ,:body => 'body') |
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
| FROM ubuntu:14.04 | |
| # SO requeriments | |
| RUN sudo apt-get update -y | |
| RUN apt-get install -y wget curl git python-virtualenv | |
| RUN sudo echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list | |
| RUN sudo wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | |
| RUN sudo apt-get update -y | |
| RUN apt-get install -y google-chrome-stable |
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
| docker stop $(docker ps -a -q) | |
| docker rm $(docker ps -a -q) |
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
| curl -s -o /dev/null -w "%{http_code}" -XPOST 'URL' -d "data=VALUE" |
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
| CREATE OR REPLACE FUNCTION do_replication_log(remote_connection_info text, local_connection_info text, schema_name text, last_replication_date_hour timestamp with time zone) | |
| RETURNS timestamp with time zone AS | |
| $BODY$ | |
| DECLARE | |
| RegistrosLoop RECORD; | |
| remote_connection_id text; | |
| local_connection_id text; | |
| last_timestamp timestamp with time zone; | |
| has_more_records boolean = false; |
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
| </dev/urandom tr -dc '123456789!@#$%qwertQWERTasdfgASDFGzxcvbZXCVB' | head -c32; echo "" |
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
| /* | |
| * This build file was auto generated by running the Gradle 'init' task | |
| * by 'alex' at '1/27/15 7:02 PM' with Gradle 2.2.1 | |
| * | |
| * This generated file contains a commented-out sample Java project to get you started. | |
| * For more details take a look at the Java Quickstart chapter in the Gradle | |
| * user guide available at http://gradle.org/docs/2.2.1/userguide/tutorial_java_projects.html | |
| */ | |
| // Apply the java plugin to add support for Java |
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 | |
| HOST='host' | |
| USER='username' | |
| PASSWD='password' | |
| REMOTE_FOLDER='remote_folder' | |
| ftp -n -v $HOST << EOT | |
| ascii | |
| user $USER $PASSWD | |
| prompt |
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/ruby | |
| full_filename = 'file.log' | |
| text_to_search = 'string_to_search' | |
| fileObj = File.new(full_filename, "r") | |
| while (line = fileObj.gets) | |
| if line.include? text_to_search | |
| puts(line) |