Skip to content

Instantly share code, notes, and snippets.

View jonathangaldino's full-sized avatar
🏠
Working from home

Jonathan jonathangaldino

🏠
Working from home
View GitHub Profile
@jonathangaldino
jonathangaldino / default.conf
Created May 30, 2019 20:12
1/Allow CORS in Nginx
server {
server_name localhost;
listen 80 ;
access_log /var/log/nginx/access.log;
location / {
if ($request_method = OPTIONS) {
return 204;
}
proxy_redirect off;
@jonathangaldino
jonathangaldino / log.txt
Created August 2, 2019 05:36
Erro ao dar run no modo release
2019-08-02 02:34:33.335308-0300 sugahapp[28061:148383] <Warning>: The value for FacebookAdvertiserIDCollectionEnabled is currently set to FALSE so you're sending app events without collecting Advertiser ID. This can affect the quality of your advertising and analytics results.
2019-08-02 02:34:33.458023-0300 sugahapp[28061:148383] Falling back to loading access token from NSUserDefaults because of simulator bug
2019-08-02 02:34:33.458142-0300 sugahapp[28061:148383] Falling back to storing access token in NSUserDefaults because of simulator bug
2019-08-02 02:34:33.462611-0300 sugahapp[28061:148383] FBSDKLog: FBSDKGraphRequestConnection cannot be started before Facebook SDK initialized.
2019-08-02 02:34:33.467320-0300 sugahapp[28061:148383] FBSDKLog: FBSDKGraphRequestConnection cannot be started before Facebook SDK initialized.
2019-08-02 02:34:33.467842-0300 sugahapp[28061:148383] FBSDKLog: FBSDKGraphRequestConnection cannot be started before Facebook SDK initialized.
2019-08-02 02:34:33.568685-0300 sugahapp[2
@jonathangaldino
jonathangaldino / IDEDistribution.standard.log
Created August 3, 2019 22:35
Log ao usar as libs na forma embutida.
2019-08-03 10:14:14 PM +0000 [OPTIONAL] Didn't find archived user entitlements for <DVTFilePath:0x7fbc2aebab70:'/Users/john/Library/Developer/Xcode/Archives/2019-08-02/TaiyoApp 02-08-19 11.03 PM.xcarchive/Products/Applications/tayoapp.app/Frameworks/FBSDKShareKit.framework'>: Error Domain=NSCocoaErrorDomain Code=4 "Item at "/Users/john/Library/Developer/Xcode/Archives/2019-08-02/TaiyoApp 02-08-19 11.03 PM.xcarchive/Products/Applications/tayoapp.app/Frameworks/FBSDKShareKit.framework" did not contain a "archived-expanded-entitlements.xcent" resource." UserInfo={NSLocalizedDescription=Item at "/Users/john/Library/Developer/Xcode/Archives/2019-08-02/TaiyoApp 02-08-19 11.03 PM.xcarchive/Products/Applications/tayoapp.app/Frameworks/FBSDKShareKit.framework" did not contain a "archived-expanded-entitlements.xcent" resource.}
2019-08-03 10:14:14 PM +0000 [OPTIONAL] Didn't find archived user entitlements for <DVTFilePath:0x7fbc2aec32e0:'/Users/john/Library/Developer/Xcode/Archives/2019-08-02/TaiyoApp 02-08-19 11.03
server {
server_name localhost;
listen 80;
access_log /var/log/nginx/access.log;
location / {
if ($request_method = OPTIONS) {
return 204;
}
proxy_redirect off;
@jonathangaldino
jonathangaldino / create.test.js
Created January 21, 2020 03:27
Teste da função de criar usuários - exemplos
import supertest from "supertest";
import app from "../../../app";
import { connect, disconnect } from "../../../../test/database";
import {
generateUser,
removeUsers,
removePlates,
generatePlate
} from "../../../../test/helper";
@jonathangaldino
jonathangaldino / database.js
Created February 1, 2020 20:20
Usando o mongodb-memory-server
const mongoose = require("mongoose");
const { MongoMemoryServer } = require("mongodb-memory-server");
let mongoServer = null;
const connect = async () => {
mongoose.Promise = global.Promise;
mongoServer = new MongoMemoryServer();
const mongoUri = await mongoServer.getUri();
@jonathangaldino
jonathangaldino / rearct-native-app-in-wsl2.md
Last active May 25, 2020 16:00 — forked from bergmannjg/rearct-native-app-in-wsl2.md
Building a react native app in WSL2
@jonathangaldino
jonathangaldino / nginx.conf
Last active May 28, 2020 14:04 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
{
"applinks": {
"apps": [],
"details": [
{
"appIDs": [
"JZS429223Z.com.playlegis"
],
"appId": "JZS429223Z.com.playlegis",
"components": [
@jonathangaldino
jonathangaldino / schema_dumper.rb
Created May 3, 2023 17:55 — forked from GlenCrawford/schema_dumper.rb
Patching Rails database schema dumps to support multiple PostgreSQL schemas.
# Overrides Rails file activerecord/lib/active_record/schema_dumper.rb to
# include all schema information in the db/schema.rb file, for example, in the
# create_table statements. This allows for a working development database
# to be built from a schema.rb file generated by rake db:schema:dump.
#
# This is essentially a rebuild of the "schema_plus_multischema" gem (which is
# unfortunately only compatible with Rails ~> 4.2).
#
# Tested with Rails 6.0.