Skip to content

Instantly share code, notes, and snippets.

View brunomacf's full-sized avatar

Bruno Fonseca brunomacf

  • Nosebit Ltda
  • Brazil
View GitHub Profile
import React from "react";
import PropTypes from "prop-types";
import i18n from "darch/src/i18n";
import Http from "darch/src/utils/http";
import LoggerFactory from "darch/src/utils/logger";
const Logger = new LoggerFactory("fake");
/**
* Main component class.
import Fake from "./component";
import {shallow} from "enzyme";
describe("Fake Component", () => {
describe("load method", () => {
describe("on valid url", () => {
it("should set remote object to component state", (done) => {
const url = "http:///.....";
const httpMock = {
@brunomacf
brunomacf / index.html
Last active April 10, 2018 23:35
kube-test index
<!DOCTYPE html>
<html>
<head>
<title>Test</title>
</head>
<body>
<h1>Hello World!</h1>
</body>
@brunomacf
brunomacf / Dockerfile
Last active April 8, 2018 14:59
kube-test Dockerfile
FROM mhart/alpine-node:9
WORKDIR /home
ADD . ./
RUN npm install -g http-server
CMD http-server -p 80 ./
@brunomacf
brunomacf / gitlab-ci.yml
Last active October 31, 2019 09:55
kube-test gitlab-ci
image: docker:latest
services:
- docker:dind
stages:
- build
- deploy
variables:
CONTAINER_DEV_IMAGE: registry.gitlab.com/brunomacf/kube-test:$CI_COMMIT_SHA
@brunomacf
brunomacf / kubernetes.tpl.yml
Created April 8, 2018 00:28
kube-test kubernetes.tpl.yml
apiVersion: apps/v1
kind: Deployment
metadata:
name: _APP_NAME_
labels:
app: _APP_NAME_
spec:
replicas: 1
selector:
matchLabels:
var namespace = window.GlobalSnowplowNamespace = window.GlobalTapinfluenceNamespace || window.GlobalSnowplowNamespace;
var tracker = namespace.length ? window[namespace[0]] : null;
console.log(["@@@ namespace", namespace.length ? namespace[0] : ""]);
console.log(["@@@ tracker", tracker]);
if (tracker) {
// We need to hack original tracker to handle trackConversion event
// transparently for the user since this event is deprecated in new
// snowplow script.
@brunomacf
brunomacf / usefull_commands
Created February 3, 2021 15:07
usefull_commands
## To run multiple local service
```bash
gemstone up -l obsidian,jasper
```
---------------------------------------------------------------
## To run local tourmaline pointing to QA ES
import gc
import os
import pandas as pd
import psutil
import time
import sys
from random import seed
from random import random
from datetime import datetime