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
sudo mkdir -p /var/mongodb/mongodb-1 /var/mongodb/mongodb-2 /var/mongodb/mongodb-3 | |
sudo docker run -d -it -p 27018:27017 -v /var/mongodb/mongodb-1:/data/db -v /var/config:/var/config --name mongodb-1 -d mongo mongod --replSet midas --bind_ip 0.0.0.0 | |
sudo docker run -d -it -p 27019:27017 -v /var/mongodb/mongodb-2:/data/db -v /var/config:/var/config --name mongodb-2 -d mongo mongod --replSet midas --bind_ip 0.0.0.0 | |
sudo docker run -d -it -p 27020:27017 -v /var/mongodb/mongodb-3:/data/db -v /var/config:/var/config --name mongodb-3 -d mongo mongod --replSet midas --bind_ip 0.0.0.0 | |
mongo 127.0.0.1:27018 <<<"rs.initiate({_id: 'midas', members: [ {_id: 0, host:'10.224.28.131:27018'}, {_id: 1, host:'10.224.28.131:27019'}, {_id: 2, host:'10.224.28.131:27020'}]})" |
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
# curl -s https://gist.githubusercontent.com/xymor/4cf2bd593d89f4722d0a4d69654ac762/raw/6feaef84c7906be7b4a48f1ce9691442a378471c/docker-ubuntu.sh | bash | |
# curl -sL https://git.io/vyQoI | sudo bash | |
apt-get remove docker docker-engine | |
apt-get install \ | |
linux-image-extra-$(uname -r) \ | |
linux-image-extra-virtual -y | |
apt-get install \ |
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
#!/bin/bash | |
# Expects Ubuntu 16.06 (xenial) and kernel 4.x. | |
# Based upon a blog post by Zach at http://zachzimm.com/blog/?p=191 | |
set -eux | |
# Have the user call sudo early so the credentials is valid later on | |
sudo whoami | |
sudo apt-get install libssl-dev -y |
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
keytool -printcert -sslserver secure.fcontrol.com.br -rfc > fcontrol.pem | |
#alternative: openssl s_client -quiet -showcerts -connect secure.fcontrol.com.br:443 | sed -n '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > fcontrol.pem | |
keytool -import -trustcacerts -alias secure.fcontrol.com.br -file fcontrol.pem -keystore /home/raphaelm/projects/git-repos/ideais-kanlo/etc/kanlo2/vmfiles/etc/pki/java/cacerts | |
#list trusted certificates | |
keytool -list -keystore /home/raphaelm/projects/git-repos/ideais-kanlo/etc/kanlo2/vmfiles/etc/pki/java/cacerts |
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
#!/usr/bin/env ruby | |
require 'net/http' | |
require 'rss' | |
require 'rexml/document' | |
project = "LASATESOURARIA-TESOURARIA" | |
username = 'user' | |
password = 'password' |
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
Verifying that +raphaelom is my blockchain ID. https://onename.com/raphaelom |
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
@Grapes([ | |
@Grab("org.gebish:geb-core:0.12.0"), | |
//@Grab("org.seleniumhq.selenium:selenium-firefox-driver:2.50.1"), | |
//@Grab("org.seleniumhq.selenium:selenium-support:2.50.1") | |
@Grab("org.seleniumhq.selenium:selenium-chrome-driver:2.21.0") | |
]) | |
import geb.Browser | |
Browser.drive { | |
quitCachedDriverOnShutdown = false; | |
go "https://url/login" |
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
#sudo sudo apt-get install firefox xvfb | |
#gem install watir-webdriver | |
#run with xvfb-run ruby file.rb | |
require 'watir-webdriver' | |
browser = Watir::Browser.new | |
browser.goto 'https://loja.com.br/admin/login/auth' | |
browser.text_field(:name => "j_username").set "xxx" | |
browser.text_field(:name => "j_password").set "xxx" |
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
require "pstore" | |
dict = PStore.new("/tmp/store") | |
dict.transaction do | |
dict["Parallel computing"] = <<-eos | |
type of computation in which many calculations are carried out simultaneously, operating on the principle that large problems can often be divided into smaller ones, which are then solved at the same time. There are several different forms of parallel computing: bit-level, instruction-level, data, and task parallelism. Parallelism has been employed for many years, mainly in high-performance computing, but interest in it has grown lately due to the physical constraints preventing frequency scaling. | |
eos |
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
<g:js file="encodeBase64" /> | |
<g:js file="jquery.cookie" /> | |
<script type="text/javascript"> | |
var dataLayer = dataLayer || []; | |
var _data = {}; | |
var pageName = '${params.page}'; | |
var injectCustomer = function(obj){ | |
var userId64 = $.cookie('${kanlo.storeSymbol()}UserId'); |