Skip to content

Instantly share code, notes, and snippets.

View rafael-fernandes's full-sized avatar
🏠
Working from home

Rafael Alves Fernandes rafael-fernandes

🏠
Working from home
View GitHub Profile
HTTPI /peer GET request to services.dshopdesenv.com (net_http)
SOAP request: http://services.dshopdesenv.com/giftty/server.php
Proxy-Authorization: -------, Content-Type: text/xml, SOAPAction: "http://services.dshopdesenv.com/giftty/server.php#ConsultarPedidosEntregues", Content-Length: 411
<?xml version='1.0' encoding='UTF-8'?><env:Envelope xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:tns='urn:Giftty' xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:Body><tns:ConsultarPedidosEntregues><tns:xmlDados><![CDATA[<Tracking><projeto>P23</projeto></Tracking>]]></tns:xmlDados></tns:ConsultarPedidosEntregues></env:Body></env:Envelope>
HTTPI /peer POST request to services.dshopdesenv.com (net_http)
SOAP response (status 200)
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC
#!/usr/bin/env ruby
require 'aspector'
watcher = Aspector do
around(/.*/, except: Object.methods) do |proxy, *args, &block|
puts "before #{proxy.name} on #{proxy.receiver}"
proxy.call(*args, &block)
puts "after #{proxy.name} on #{proxy.receiver}"
end
DROP TABLE IF EXISTS clientes CASCADE;
DROP TABLE IF EXISTS tipos_contas CASCADE;
DROP TABLE IF EXISTS niveis_privilegios CASCADE;
DROP TABLE IF EXISTS contas CASCADE;
DROP TABLE IF EXISTS bancos CASCADE;
DROP TABLE IF EXISTS agencias CASCADE;
DROP TABLE IF EXISTS cartoes CASCADE;
CREATE TABLE clientes (
id_cliente SERIAL PRIMARY KEY,
def sign(x)
return '+' if x >= 0
return '-'
end
# Calcula f(x)
def f(x)
x ** 3 + x - 1
end
@rafael-fernandes
rafael-fernandes / ps-txt.rb
Created March 16, 2017 16:10
Extração de palavras de um arquivo texto
TIPO_UTIL_CHARS = "abcdefghijklmnopqrstuvwxyz"
class String
def tipo_util?
TIPO_UTIL_CHARS.include? self
end
end
texto = File.read('ps.txt')
@rafael-fernandes
rafael-fernandes / index.html
Created March 4, 2017 18:23
application wecare
<!DOCTYPE html>
<html>
<head>
<title>Wecare</title>
<%= csrf_meta_tags %>
<%= stylesheet_link_tag 'application', media: 'all' %>
<%= favicon_link_tag 'favicon.png' %>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- start Mixpanel --><script type="text/javascript">(function(e,a){if(!a.__SV){var b=window;try{var c,l,i,j=b.location,g=j.hash;c=function(a,b){return(l=a.match(RegExp(b+"=([^&]*)")))?l[1]:null};g&&c(g,"state")&&(i=JSON.parse(decodeURIComponent(c(g,"state"))),"mpeditor"===i.action&&(b.sessionStorage.setItem("_mpcehash",g),history.replaceState(i.desiredHash||"",e.title,j.pathname+j.search)))}catch(m){}var k,h;window.mixpanel=a;a._i=[];a.init=function(b,c,f){function e(b,a){var c=a.split(".");2==c.length&&(b=b[c[0]],a=c[1]);b[a]=function(){b.push([a].concat(Array.prototype.slice.call(arguments,
0)))}}var d=a;"undefined"!==typeof f?d=a[f]=[]:f="mixpanel";d.people=d.people||[];d.toString=function(b){var a="mixpanel";"mixpanel"!==f&&(a+="."+f);b||(a+="
@rafael-fernandes
rafael-fernandes / d.asm
Created October 2, 2016 13:50
Função D
.eqv END_BASE 0xFF000000 # Endereço Base
.eqv COR_VERMELHA 7
.eqv COR_PRETA 0
.eqv WIDTH_INT 320
.eqv HEIGHT_INT 240
.data
# Dados do Bitmap Display
WIDTH: .float 320
@rafael-fernandes
rafael-fernandes / c.asm
Last active October 2, 2016 13:28
Função C
.eqv END_BASE 0xFF000000 # Endereço Base
.eqv COR_VERMELHA 7
.eqv COR_PRETA 0
.eqv WIDTH_INT 320
.eqv HEIGHT_INT 240
.data
# Dados do Bitmap Display
WIDTH: .float 320
@rafael-fernandes
rafael-fernandes / b.asm
Last active October 2, 2016 13:22
Função B
.eqv END_BASE 0xFF000000 # Endereço Base
.eqv COR_VERMELHA 7
.eqv COR_PRETA 0
.eqv WIDTH_INT 320
.eqv HEIGHT_INT 240
.data
# Dados do Bitmap Display
WIDTH: .float 320
@rafael-fernandes
rafael-fernandes / a.asm
Last active October 2, 2016 13:22
Função A
.eqv END_BASE 0xFF000000 # Endereço Base
.eqv COR_VERMELHA 7
.eqv COR_PRETA 0
.eqv WIDTH_INT 320
.eqv HEIGHT_INT 240
.data
# Dados do Bitmap Display
WIDTH: .float 320