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
# Run grafana locally
$ brew services start grafana
$ brew services start grafana-agent # Start agent
$ brew services info grafana-agent # Start agent
# Path error log grafana (agent, all)
/usr/local/var/log/
# Stop grafana locally
$ brew services stop grafana
@matteocollina
matteocollina / How to change User Status FORCE_CHANGE_PASSWORD
Last active November 15, 2022 14:26
How to change User Status FORCE_CHANGE_PASSWORD
aws cognito-idp admin-set-user-password --user-pool-id <your-user-pool-id> --username <username> --password <password> --permanent
@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 / cypress.io seminario
Last active October 11, 2019 17:49
Seminario su cypress
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)
# Start Metro bundler with env var
$ REACT_APP_ENV=prod react-native start --reset-cache
$ react-native run-ios
# Create a public key (https://git-scm.com/book/it/v1/Git-sul-Server-Generare-la-Propria-Chiave-Pubblica-SSH)
$ ssh-keygen -t rsa
# If it doesn't work
$ ssh-add ~/.ssh/id_rsa
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'
CREATE TABLE `Student`
(
`idStudent` int NOT NULL auto_increment,
`name` varchar(45) NOT NULL ,
PRIMARY KEY (`idStudent`)
);
CREATE TABLE `Exam`
(
//It works only for iOS, with Android i can't set picker with intervals
onDateChange={(date)=>{
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))
}
Router
Stack
Scene "Landing"
Tabs tabBarComponent={_CustomTabBarComponent_}
**#1st child**
Lightbox key="First"
Drawer
Scene**A**,Scene**B**