Skip to content

Instantly share code, notes, and snippets.

Soe Moe jittuu

Block or report user

Report or block jittuu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jittuu
jittuu / Dockerfile
Created Jul 2, 2019
Dockerfile for go web api
View Dockerfile
FROM golang:1.12 as builder
ADD . /app/api
WORKDIR /app/api
RUN go mod download
RUN CGO_ENABLED=0 GOOS=linux go build -v -o api
FROM alpine
@jittuu
jittuu / QRCodeScanner.tsx
Created Nov 28, 2018
QR Code Scanner for React Native
View QRCodeScanner.tsx
import { debounce } from 'lodash';
import React from 'react';
import {
Dimensions,
StyleSheet,
TouchableOpacity,
View,
ViewStyle,
} from 'react-native';
import { BarCodeType, Point, RNCamera, Size } from 'react-native-camera';
@jittuu
jittuu / PhotoStateList.tsx
Created Nov 19, 2018
usage of FirebaseInfiniteFlatList
View PhotoStateList.tsx
import React from 'react';
import {
Dimensions,
Image,
ListRenderItemInfo,
StyleSheet,
Text,
TouchableWithoutFeedback,
View,
ViewStyle,
@jittuu
jittuu / FirebaseInfiniteFlatList.tsx
Created Nov 19, 2018
Infinite FlatList with Firebase integration
View FirebaseInfiniteFlatList.tsx
import { throttle } from 'lodash';
import React from 'react';
import { ActivityIndicator, FlatList, ListRenderItem } from 'react-native';
import { RNFirebase } from 'react-native-firebase';
import { Subject, Subscription } from 'rxjs';
type Query = RNFirebase.firestore.Query;
type DocumentSnapshot = RNFirebase.firestore.DocumentSnapshot;
interface P<T> {
View ConnectionStatus.tsx
import React from 'react';
import {
StyleSheet,
Text,
ViewStyle,
} from 'react-native';
import { TextStyle } from 'react-native';
import { ViewProps } from 'react-native';
import { LayoutAnimation } from 'react-native';
import * as Animatable from 'react-native-animatable';
@jittuu
jittuu / auth.ts
Created Jun 28, 2018
generate firestore token for backoffice user
View auth.ts
import * as functions from 'firebase-functions';
import * as admin from 'firebase-admin';
import { compare } from 'bcryptjs';
import { Merchant } from '../state';
interface AuthRequest {
username: string;
password: string;
}
@jittuu
jittuu / main.go
Created Dec 13, 2017
proxy for metabase to run behind IIS
View main.go
package main
import (
"fmt"
"log"
"net/http"
"net/http/httputil"
"os"
"os/exec"
"time"
View DateInput.tsx
import * as React from 'react';
import * as moment from 'moment';
import { LocaleUtils, Modifier } from 'react-day-picker';
import DayPickerInput from 'react-day-picker/lib/src/DayPickerInput';
const dateFormat = 'DD/MM/YYYY';
interface YearMonthProps {
date?: Date;
View DateInput.tsx
import * as React from 'react';
import * as moment from 'moment';
import { LocaleUtils, Modifier } from 'react-day-picker';
import DayPickerInput from 'react-day-picker/lib/src/DayPickerInput';
const dateFormat = 'DD/MM/YYYY';
interface YearMonthProps {
date?: Date;
View fiveBytesID.go
package main
import (
"encoding/base32"
"encoding/binary"
"fmt"
"math/rand"
"time"
)
You can’t perform that action at this time.