Skip to content

Instantly share code, notes, and snippets.

View wallynm's full-sized avatar
🎯
Focusing

Wallysson mota wallynm

🎯
Focusing
View GitHub Profile
@wallynm
wallynm / jivochat
Last active February 21, 2019 19:09
(function(){ var widget_id = 'Fq0bBYQJDQ';var d=document;var w=window;function l(){
var s = document.createElement('script'); s.type = 'text/javascript'; s.async = true;
s.src = '//code.jivosite.com/script/widget/'+widget_id
; var ss = document.getElementsByTagName('script')[0]; ss.parentNode.insertBefore(s, ss);}
if(d.readyState=='complete'){l();}else{if(w.attachEvent){w.attachEvent('onload',l);}
else{w.addEventListener('load',l,false);}}})();
LoadPaymentMethod(function(Checkout, Methods) {
var method = this
var PagseguroDebit = new Methods.Transparent.DebitPayment({
name: 'Pagseguro',
scripts: 'https://stc.pagseguro.uol.com.br/pagseguro/api/v2/checkout/pagseguro.directpayment.js',
onSubmit: function(formData) {
console.info('Submitted Debit Pagseguro: ', formData)
},
onScriptLoad: function() {
@wallynm
wallynm / Medium 01 - form.css
Created August 20, 2018 05:19
Medium 01 - CSS Modules
{
'form': 'form-form-sxh2b',
'xmas': 'form-xmas-hjwx9',
'simple': 'form-simple-l2ye4'
}
@wallynm
wallynm / Medium 01 - webpack.config.js
Created August 20, 2018 04:57
Medium 01 - CSS Modules
{
loader: 'css-loader',
options: {
importLoaders: 1,
camelCase: 'only',
modules: true,
localIdentName: '[name]__[local]--[hash:base64:5]'
}
}
@wallynm
wallynm / Medium - form-modules.js
Created August 20, 2018 04:51
Medium 01 - CSS Modules
import React, { Component } from 'react'
import styles from 'form-module.css'
class Form extends Component {
render() {
return <form className={styles.form} />
}
}
@wallynm
wallynm / Medium 01 - form.css
Last active August 20, 2018 04:54
Medium 01 - CSS Modules
.form {
border: 1px solid #CCC;
background: #FFF;
}
.xmas {
composes: form;
background: red;
}
.simple {
composes: form;
@wallynm
wallynm / Medium - form.css
Created August 20, 2018 04:07
Medium 01 - CSS Modules
.form { }
.form--theme-xmas { }
.form--simple { }
.form__input { }
.form__submit { }
.form__submit--disabled { }
@wallynm
wallynm / Medium - form.html
Created August 20, 2018 04:05
Medium - 01 CSS Modules
<form class="form form--theme-xmas form--simple">
<input class="form__input" type="text" />
<input
class="form__submit form__submit--disabled"
type="submit" />
</form>
@wallynm
wallynm / 0-tiendanube-payment-sdk.md
Last active November 5, 2018 10:58
Payment Integration

Instructions about how integrate all external methods

To generate and get the gist files updated:

var scripts = {}
document.querySelectorAll('.file-header .btn.btn-sm ').forEach(item => {
	const script = item.href.replace('gist.github', 'rawgit')
	const data = script.split('/')