Skip to content

Instantly share code, notes, and snippets.

View xymor's full-sized avatar

Raphael Miranda xymor

View GitHub Profile
@xymor
xymor / gvt-mtu.js
Last active September 8, 2018 02:47 — forked from anonymous/gvt-mtu.js
script para mudar mtu do roteador GVT
//acessar 192.168.25.1/save_rg_conf.cgi
var objts = {};
$.xmo.getValuesTree("Device/IP/Interfaces/Interface[@uid='1']/MaxMTUSize");
$.xmo.getValuesTree("Device/IP/Interfaces/Interface[@uid='1']/LowerLayers");
$.xmo.getValuesTree("Device/IP/Interfaces/Interface[@uid='2']/MaxMTUSize");
$.xmo.getValuesTree("Device/IP/Interfaces/Interface[@uid='2']/LowerLayers");
@xymor
xymor / bamboo.rb
Last active July 8, 2016 16:19
Ruby script that reads the bamboo build status and coverage metric to push them as a desktop notification
#!/usr/bin/env ruby
require 'net/http'
require 'rss'
require 'rexml/document'
project = "LASATESOURARIA-TESOURARIA"
username = 'user'
password = 'password'
Verifying that +raphaelom is my blockchain ID. https://onename.com/raphaelom
@xymor
xymor / gebish.groovy
Last active April 29, 2016 13:53
Simple gebish/selenium automation, logs in by inserting user and pass, and do some things.
@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"
#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"
@xymor
xymor / pstore.rb
Created December 17, 2015 21:17
pstore example
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
@xymor
xymor / datalayer.gsp
Created December 15, 2015 17:21
datalayer.gsp
<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');
@xymor
xymor / category.gsp
Created October 14, 2015 19:26
category.gsp
<kanlo:categoryMenu k:product="${product}" k:category="${category}">
<li class="k-nv-it ${category.name}">
<a class="k-nav-sdLnk subhead ${category.name}" href="${categoryLink}">${category.name}</a>
<g:if test="${category.children}">
<ul class="k-nav-subDpt">
<g:each in="${category.children}" var="children">
<li class="k-nav-sdLt ${children.name}">
<a class="k-nav-sdSbLnk ${children.name}" href="${createProductCategoryLink(category: children)}">- ${children.name}</a>
</li>
@xymor
xymor / keybase.md
Created August 8, 2015 21:04
keybase auth

Keybase proof

I hereby claim:

  • I am xymor on github.
  • I am raphaelmiranda (https://keybase.io/raphaelmiranda) on keybase.
  • I have a public key whose fingerprint is 2979 721A F0E7 D4A6 AD76 FDC1 368A 328F 76E4 DFB5

To claim this, I am signing this object:

@xymor
xymor / mongoid.yml
Created March 21, 2015 23:37
simple mongoid config to use with mongolab env.vars
development:
# Configure available database sessions. (required)
sessions:
# Defines the default session. (required)
default:
# Defines the name of the default database that Mongoid can connect to.
# (required).
database: special_blog_development
# Provides the hosts the default session can connect to. Must be an array
# of host:port pairs. (required)