Skip to content

Instantly share code, notes, and snippets.

View BrunoVillanova's full-sized avatar
🎯

Bruno Villanova BrunoVillanova

🎯
View GitHub Profile
@jinthagerman
jinthagerman / DateHelpers.swift
Created February 26, 2017 10:26
Time ago/ahead in Swift
import Foundation
struct DateComponentUnitFormatter {
private struct DateComponentUnitFormat {
let unit: Calendar.Component
let singularUnit: String
let pluralUnit: String
@heaversm
heaversm / react-native-zoom-carousel.js
Created June 5, 2017 17:20
React Native Animated Zoom Carousel
@EQuimper
EQuimper / clear.txt
Created June 16, 2017 16:17
React-Native clear Watchman + Cache
watchman watch-del-all && rm -rf node_modules/ && yarn cache clean && yarn install && yarn start -- --reset-cache
@leeirvinekezzico
leeirvinekezzico / TabBar Center Button
Last active September 2, 2020 00:27
Add button to center of UITabBarController
//
// CenterButtonTabBarController.swift
// FashionCritic
//
// Created by Lee Irvine on 1/5/18.
// Copyright © 2018 kezzi.co. All rights reserved.
//
import UIKit
@simonw
simonw / redis-docker-for-mac.md
Last active August 26, 2024 17:27
How to run a redis server using Docker-for-Mac

How to run a redis server using Docker-for-Mac

This will work with other flavours of Docker as well.

Run the following command:

docker run --name my-redis -p 6379:6379 --restart always --detach redis

This will download and run redis, set to auto-restart when your machine starts and bound to port 6379 on your machine.

@andrewsantarin
andrewsantarin / README.md
Created August 13, 2018 03:10 — forked from joelbowen/README.md
create-react-native-app environment variables

Steps:

  1. Rename your app.json file to base-app.json. This will be used as the template to generate the final app.json output.
  2. On your .gitignore file, add:
# ...your other ignored files

# use base-app.json instead because we're generating this file during builds.
app.json
@npearce
npearce / install-docker.md
Last active May 21, 2025 14:32
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start
@skymobilebuilds
skymobilebuilds / carthage-xc12.sh
Last active May 17, 2022 12:36
Xcode 13 and 12 Carthage Build Workaround
#!/bin/bash -e
echo "🤡 Applying carthage 12 and 13 workaround 🤡"
xcconfig=$(mktemp /tmp/static.xcconfig.XXXXXX)
# For Xcode 12 make sure EXCLUDED_ARCHS is set to arm architectures otherwise
# the build will fail on lipo due to duplicate architectures.
CURRENT_XCODE_VERSION=$(xcodebuild -version | grep "Build version" | cut -d' ' -f3)
echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200 = arm64 arm64e armv7 armv7s armv6 armv8' > $xcconfig
echo "EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200__BUILD_$CURRENT_XCODE_VERSION = arm64 arm64e armv7 armv7s armv6 armv8" >> $xcconfig