Skip to content

Instantly share code, notes, and snippets.

View banduk's full-sized avatar

Mauricio banduk

View GitHub Profile
@banduk
banduk / cities.js
Last active October 30, 2020 21:21
Estados e Cidades do Brasil - Atualizado com dados do IBGE 2020
export default {
AC: [
"Acrelândia",
"Assis Brasil",
"Brasiléia",
"Bujari",
"Capixaba",
"Cruzeiro do Sul",
"Epitaciolândia",
"Feijó",
# https://developer.mixpanel.com/docs/ios-push-notifications#importing-device-tokens
MIXPANEL_TOKEN = ""
def get_distinct_id(user_id)
user_id
end
def to_hex(s)
# s.unpack('U'*s.length).collect{|x| x.to_s 16}.join
@banduk
banduk / configureZendrive.js
Created September 4, 2018 12:37
Configure zendrive react native
// In the project I used zendrive I was using cocoapods.
// So I added the following row in the Podfile and ran pod install
// pod 'ZendriveWrapper', :path => './../node_modules/react-native-zendrive/ios'
// Than I added linsteners to zendrive events:
// FOR IOS
import ZendriveWrapper from 'react-native-zendrive';
import { NativeEventEmitter } from 'react-native';
const zdEmitter = new NativeEventEmitter(ZendriveWrapper);
@banduk
banduk / tes.js
Created March 24, 2017 15:49
test
const tests = [
{ desc: 'case 1', params: { name: 'name 1' } },
{ desc: 'case 2', params: { name: 'name 2', birthday: '19/02' } },
]
tests.forEach((test) => {
it(`${test.desc}`, function*() {
// run test with test.params
})
})
@banduk
banduk / callTimes.js
Created December 7, 2016 14:44
callTimes
function CalledMoreThanExpected(meta = {}) {
this.name = 'CalledMoreThanExpected'
this.message = 'Function called more than the expected times'
this.meta = meta
this.stack = (new Error()).stack
}
CalledMoreThanExpected.prototype = Error.prototype
CalledMoreThanExpected.prototype.constructor = CalledMoreThanExpected