Skip to content

Instantly share code, notes, and snippets.

View matteocollina's full-sized avatar

Matteo Collina matteocollina

  • DMA
  • Cesena (FC) - Italy
View GitHub Profile
@matteocollina
matteocollina / mongoutils.sh
Last active June 12, 2018 21:08
Lesson on Mongo db @ University (Milan). From install packages on python, to test Pymongo on macOSX
# ------ Prerequisites ------
# Start server
$ mongod
# Start client
$ mongo
# Install packages on python 2.7 (required version of "pip" >= 10)
$ sudo pip install --ignore-installed pymongo
$ sudo pip install --ignore-installed numpy
# react-native-cli: 2.0.1
# react-native: 0.55.3
# NB: My rn files are inside "js" dir
project 'Golee.xcodeproj'
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
@matteocollina
matteocollina / Podfile_RN_0_51_0
Created May 8, 2018 15:49
Podfile stable ios React Native 0.51.0
# Podfile stable ios React Native 0.51.0 and React 16.0.0
project 'Golee.xcodeproj'
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'Golee' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
@matteocollina
matteocollina / Fastfile
Last active April 27, 2018 16:44
An example to create ad-hoc ipa and deploy to Crashlytics
platform :ios do
desc "Example Fastlane - Ipa + Crashlytics"
lane :beta do
get_provisioning_profile(
adhoc: true,
force: true
)
gym(
export_method:"ad-hoc",
scheme: "MyApp",
@matteocollina
matteocollina / make_app_simulator.sh
Created April 26, 2018 12:05
Make .app file for simulator
# Replace "MyApp" with your app name
XCODE_WORKSPACE=/Users/MacBook/iOS/MyApp.xcworkspace
xcrun xcodebuild \
-scheme MyApp \
-workspace $XCODE_WORKSPACE \
-configuration Debug \
-destination 'platform=iOS Simulator,name=iPhone 8,OS=11.2' \
-derivedDataPath \
build
@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",
@matteocollina
matteocollina / package.json
Created March 29, 2018 21:41
Simple React Native package.json
{
"name": "StoryReact",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start"
}
}
@matteocollina
matteocollina / Podfile
Created March 29, 2018 21:40
Podfile to install react dependencies
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'StoryReact' do
use_frameworks!
pod 'React', :path => './js/node_modules/react-native', :subspecs => [
'Core',
'CxxBridge',
'DevSupport',
'RCTText',
'RCTNetwork',
@matteocollina
matteocollina / info.plist
Created March 29, 2018 21:38
To enable Transport Security on Xcode project (HTTP requests)
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>localhost</key>
<dict>
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
</dict>
@matteocollina
matteocollina / index.ios.js
Last active March 29, 2018 21:36
Minimal react-native js file
'use strict';
import React from 'react';
import ReactNative, {
AppRegistry,
StyleSheet,
Text,
View,
} from 'react-native';
const styles = StyleSheet.create({
container: {