Skip to content

Instantly share code, notes, and snippets.

Matteo Collina matteocollina

Block or report user

Report or block matteocollina

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View seminario
Usa JS, supportato solo su Chrome.
Vantaggio di cypress vs altri framework: non è fragile, infatti verifica che gli elementi siano nella viewport
(es. un bottone verifica che sia visible e cliccabile).
Intercettare chiamate http, fare tipo poxy, possibile mochare le chiamate
(quindi settare alcuni parametri nella risposta dal microservizio).
Testare come se fossi un utente.
GET: Faccio una query sulla base del testo che contiene (oppure data-test-id)
View React native env
# Start Metro bundler with env var
$ REACT_APP_ENV=prod react-native start --reset-cache
$ react-native run-ios
View Fix Git SSH Key
# Create a public key (
$ ssh-keygen -t rsa
# If it doesn't work
$ ssh-add ~/.ssh/id_rsa
View Podfile iOS React Native 0.60.4
platform :ios, '9.0'
target 'golee' do
# this is very important to have!
node_modules_path = '../node_modules'
rn_path = '../node_modules/react-native'
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/React'
pod 'React-DevSupport', :path => '../node_modules/react-native/React'
View How works UNIQUE in MySql.sql
`idStudent` int NOT NULL auto_increment,
`name` varchar(45) NOT NULL ,
PRIMARY KEY (`idStudent`)
View Fix on interval DatePicker (react-native-datepicker)
//It works only for iOS, with Android i can't set picker with intervals
if(this.state.dateMode == "time" && this.state.minuteInterval){
let hours = Number(String(date).split(":")[0])
let minutes = Number(String(date).split(":")[1])
let diff = minutes % this.state.minuteInterval
if(diff != 0){
date = (String(hours)+":"+String(minutes-diff))
View stack_router_flux
Scene "Landing"
Tabs tabBarComponent={_CustomTabBarComponent_}
**#1st child**
Lightbox key="First"
matteocollina / onResume-flux.js
Created Jul 4, 2018
onResume React-native-flux
View onResume-flux.js
<Lightbox key="lightbox">
<Scene key="team_nav">
matteocollina /
Last active Jun 12, 2018
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
View Podfile_RN_0_55_3
# 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'
You can’t perform that action at this time.