Skip to content

Instantly share code, notes, and snippets.

View mimol91's full-sized avatar

Adam Szaraniec mimol91

View GitHub Profile
@mimol91
mimol91 / jsx.js
Created April 28, 2020 14:14
dynamic
<View>
<View>
<Text>Are you tax resident</Text>
<TouchableOpacity onPress={setFieldVal("tax_resident", true)}>
<Text style={{color: values.tax_resident === true ? "green" : "black"}}>YES</Text>
</TouchableOpacity>
<TouchableOpacity onPress={setFieldVal("tax_resident", false)}>
<Text style={{color: values.tax_resident === false ? "green" : "black"}}>No</Text>
</TouchableOpacity>
</View>
<View>
<Text>Hello {title}</Text>
</View>
package main
import (
"encoding/json"
"testing"
)
type foo struct {
ID string `json:"_id"`
Index int `json:"index"`
@mimol91
mimol91 / resp.js
Last active July 30, 2019 11:24
resp
data = {
"state":{
"counter":2
},
"bindings": {
onClickButton : ({navigation}, setState) => () => {
setState((state) => ({counter: state.counter + 1}))
//setState({counter: 5})
setTimeout(()=>{
navigation.navigate('Home')
@mimol91
mimol91 / optimise-images-terminal.md
Created May 14, 2019 07:49 — forked from gielcobben/optimise-images-terminal.md
Optimise your pngs from the terminal in OSX

JPG:
$ brew install jpegoptim
$ find . -name "*.jpg" -exec jpegoptim -m80 -o -p --strip-all {} \;

- PNG:
$ brew install optipng
$ find . -name "*.png" -exec optipng -o7 {} \;

func Questions(p graphql.ResolveParams) (interface{}, error) {
resolver := NewResolver(&p, producer.Producer)
err, subscriber := resolver.SendEvent(topic.QuestionnaireTopicName, &protobuf.Message{
Locale: "en-US",
Topic: topic.QuestionnaireTopicName,
Type: proc.List,
Payload: protobuf.CreateQuestionnaire(&questionnaire.QuestionnairePayload_List{
List: &questionnaire.List{
Bucket: "default",

When Istio Meets Jaeger - An Example of End-to-end Distributed Tracing

Kubernetes is great! It helps many engineering teams to realize the dream of SOA (Service Oriented Architecture). For the longest time, we build our applications around the concept of monolith mindset, which is essentially having a large computational instance running all services provided in an application. Things like account management, billing, report generation are all running from a shared resource. This worked pretty well until SOA came along and promised us a much brighter future. By breaking down applications to smaller components, and having them to talk to each other using REST or gRPC. We hope expect things will only get better from there but only to realize a new set of challenges awaits. How about cross services communication? How about observability between microservices such as logging or tracing? This post demonstrates how to set up OpenTracing inside a Kubernetes cluster that enables end-to-end tracing between serv

@mimol91
mimol91 / combinators.js
Created December 12, 2018 17:38 — forked from Avaq/combinators.js
Common combinators in JavaScript
const I = x => x;
const K = x => y => x;
const A = f => x => f(x);
const T = x => f => f(x);
const W = f => x => f(x)(x);
const C = f => y => x => f(x)(y);
const B = f => g => x => f(g(x));
const S = f => g => x => f(x)(g(x));
const P = f => g => x => y => f(g(x))(g(y));
const Y = f => (g => g(g))(g => f(x => g(g)(x)));
@mimol91
mimol91 / circle.yml
Created December 12, 2018 13:50 — forked from azihsoyn/circle.yml
example circleci 2.0 with go 1.10
version: 2
jobs:
build:
working_directory: /go/src/github.com/your_company/your_app
docker:
- image: circleci/golang:1.10.0
environment:
- GOCACHE: "/tmp/go/cache"
- DEP_VERSION: 0.4.1
steps:
@mimol91
mimol91 / docker.sh
Created March 26, 2017 15:26
docker
# Ask for the user password
# Script only works if sudo caches the password for a few minutes
sudo true
# Install kernel extra's to enable docker aufs support
# sudo apt-get -y install linux-image-extra-$(uname -r)
# Add Docker PPA and install latest version
# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
# sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"