Skip to content

Instantly share code, notes, and snippets.

View amitpdev's full-sized avatar

Amit Palomo amitpdev

View GitHub Profile
@akushnikov
akushnikov / Singleton.js
Created March 30, 2016 10:35
ES6 singleton
class Singleton {
constructor() {
this.foo = 5;
}
static get Instance() {
if (this.instance == null || this.instance == undefined) {
this.instance = new Singleton();
}
return this.instance;
}
//
// UIBarButtonItem+Badge.swift
// PiGuardMobile
//
// Created by Stefano Vettor on 12/04/16.
// Copyright © 2016 Stefano Vettor. All rights reserved.
//
import UIKit
// @flow
import React, { Component } from 'react'
import { Image, Animated, View } from 'react-native'
type ProgressiveImageState = {
thumbnailOpacity: number,
key: string
}
@heron2014
heron2014 / react-native-maps-enable-google-maps-instructions.md
Last active May 21, 2024 07:25
Visual instructions how to enable Google Maps on IOS using react-native-maps

Visual instructions how to enable Google Maps on IOS using react-native-maps

UPDATE: Following instructions are now a year old. I have recently managed to upgrade react-native-maps from 0.17 to the latest version 0.21 with react-native 0.51 - if you want to follow my instruction scroll down to the end this doc! Hope that will work for you too!

This is for my personal use, things might not be correctly explained here. For the official docs please check https://github.com/airbnb/react-native-maps

Steps from scratch:

1.react-native init GoogleMapPlayground

@freak4pc
freak4pc / MKMultiPoint+Ext.swift
Last active September 5, 2024 06:36
Get a list of coordinates from a MKPolyline / MKRoute
public extension MKMultiPoint {
var coordinates: [CLLocationCoordinate2D] {
var coords = [CLLocationCoordinate2D](repeating: kCLLocationCoordinate2DInvalid,
count: pointCount)
getCoordinates(&coords, range: NSRange(location: 0, length: pointCount))
return coords
}
}
@matteocollina
matteocollina / beta_lane.sh
Last active February 5, 2020 13:57
Beta lane - Fastlane (ad-hoc)
platform :ios do
desc "This is beta lane"
lane :beta do
get_provisioning_profile(
adhoc: true,
force: true
)
increment_build_number
gym(export_method:"ad-hoc",
scheme: "Golee",
@lounagen
lounagen / readme.md
Last active April 12, 2023 00:43 — forked from thomasdarimont/readme.md
Example for decoding a JWT Payload with your Shell (bash, zsh...)

Setup

Add this to your .profile, .bashrc, .zshrc...

BASE64_DECODER_PARAM="-d" # option -d for Linux base64 tool
echo AAAA | base64 -d > /dev/null 2>&1 || BASE64_DECODER_PARAM="-D" # option -D on MacOS

decode_base64_url() {
  local len=$((${#1} % 4))
  local result="$1"
 if [ $len -eq 2 ]; then result="$1"'=='