Skip to content

Instantly share code, notes, and snippets.

View jonatasdlp's full-sized avatar

Jônatas jonatasdlp

  • Banco Inter
  • Belo Horizonte - MG
View GitHub Profile
@meylor
meylor / react-native-maps-remove-google-support.patch
Created April 5, 2018 01:13
react-native-maps-remove-google-support.patch from v0.21.0
diff --git a/./lib/ios/AirMaps.xcodeproj/project.pbxproj b/tmp/project.pbxproj
index 4bb684b..1db1202 100644
--- a/./lib/ios/AirMaps.xcodeproj/project.pbxproj
+++ b/tmp/project.pbxproj
@@ -29,25 +29,7 @@
628F81201FD16DF80058313A /* AIRMapLocalTile.m in Sources */ = {isa = PBXBuildFile; fileRef = 628F811F1FD16DF80058313A /* AIRMapLocalTile.m */; };
628F81231FD16EFA0058313A /* AIRMapLocalTileManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 628F81221FD16EFA0058313A /* AIRMapLocalTileManager.m */; };
62AEC4D41FD5A0AA003225E0 /* AIRMapLocalTileOverlay.m in Sources */ = {isa = PBXBuildFile; fileRef = 62AEC4D31FD5A0AA003225E0 /* AIRMapLocalTileOverlay.m */; };
- 9B9498CA2017EFB800158761 /* AIRGoogleMapUrlTile.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B9498A62017EFB400158761 /* AIRGoogleMapUrlTile.m */; };
- 9B9498CB2017EFB800158761 /* AIRGoogleMapURLTileManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B9498A72017EFB400158761 /* AIRGoogleMapURLTileManager.m */; };
@lelandrichardson
lelandrichardson / react-native.js
Last active July 21, 2022 17:56
React Native flow types
declare var __DEV__: boolean;
declare module 'react-native' {
declare type Color = string | number;
declare type Transform =
{ perspective: number } |
{ scale: number } |
{ scaleX: number } |
@indiesquidge
indiesquidge / subdomain-localhost-rails-5.md
Created January 19, 2016 07:42
how to access subdomains locally with Rails 5

Subdomaining Localhost with Rails 5

I've been following this blog post on how to set up an api-only Rails 5 application. One of the sections talks about creating a subdomain for your api

Rails.application.routes.draw do
  constraints subdomain: "api" do
    scope module: "api" do
@benlinton
benlinton / multiple_mysql_versions_for_development.md
Last active September 23, 2023 09:38
Multiple MySQL Versions with Homebrew

Multiple MySQL Versions for Development

Options included below:

  • Using Docker docker-compose
  • Using Homebrew brew

Using Docker (recommended)

This gist was originally created for Homebrew before the rise of Docker, yet it may be best to avoid installing mysql via brew any longer. Instead consider adding a barebones docker-compose.yml for each project and run docker-compose up to start each project's mysql service.

@jhohlfeld
jhohlfeld / gist:bc0ed726550192eb183d
Created June 12, 2015 08:10
Run different node.js versions on a Mac using homebrew

I suppose you already installed homebrew nad have one current version of node installed.

Reference taken from https://gist.github.com/kugaevsky/68a7fa894551da9c310a

First, add an older formula of node:

$ cd /usr/local
$ git checkout b64d9b9c431642a7dd8d85c8de5a530f2c79d924 Library/Formula/node.rb
$ brew unlink node
@nivertech
nivertech / aws_signature_v4.py
Created December 15, 2014 12:00
sign AWS Lambda HTTP API request - using AWS Version 4 signature
# AWS Version 4 signing example
# taken from:
# http://docs.aws.amazon.com/general/latest/gr/sigv4-signed-request-examples.html
# Lambda API (InvokeAsync)
# http://docs.aws.amazon.com/lambda/latest/dg/API_InvokeAsync.html
# See: http://docs.aws.amazon.com/general/latest/gr/sigv4_signing.html
# This version makes a POST request and passes request parameters
# in the body (payload) of the request. Auth information is passed in
@tmarshall
tmarshall / aws-sns-example.js
Last active October 30, 2022 06:12
aws-sdk sns example, in Node.js
var AWS = require('aws-sdk');
AWS.config.update({
accessKeyId: '{AWS_KEY}',
secretAccessKey: '{AWS_SECRET}',
region: '{SNS_REGION}'
});
var sns = new AWS.SNS();
@gitaarik
gitaarik / git_submodules.md
Last active May 4, 2024 11:10
Git Submodules basic explanation

Git Submodules basic explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:

  • Separate big codebases into multiple repositories.
@joshwlewis
joshwlewis / user.rb
Created November 21, 2013 16:31
When using paper_trail and devise, new user versions are saved on each request. The following prevents saving new user versions when devise trackable columns (sign_in_count, current_sign_in_at, last_sign_in_at, current_sign_in_ip, last_sign_in_ip) are updated.
class User < ActiveRecord::Base
devise :trackable
has_paper_trail
def update_tracked_fields!(request)
without_versioning { super(request) }
end
end