Skip to content

Instantly share code, notes, and snippets.

View lparolari's full-sized avatar
🎯
Focusing

Luca Parolari lparolari

🎯
Focusing
  • University of Padova
  • Padova • Italy
  • 04:59 (UTC +02:00)
View GitHub Profile
#include <iostream>
using namespace std;
int main() {
return 0;
}

Laradock troubleshooting

phpmyadmin login not works

Solved by changing the authentication method of user default to mysql native password.

Go to mysql bash docker-compose exec mysql bash
login using root mysql -u root -p password is root.
then issue following mysql command ALTER USER 'default' IDENTIFIED WITH mysql_native_password BY 'secret';

How to read a sqlite database from an Android device

adb -d shell "run-as [YOUR APP PACKAGE] cat databases/[YOUR DB NAME].db-journal" > target.sqlite-journal
autoreconf -i
./configure

Dev Cluster Seup

  • 2 server
  • 1 client

Server1

sudo adduser luca
sudo usermod -aG sudo luca
@lparolari
lparolari / react-memo-for-beginners.md
Last active July 12, 2019 18:48
A simple and introductive guide to react, from a beginner to beginners.

React

React is a JavaScript lobrary for building fast and interactive UI.

Main components of React:

  • components, a piece of UI used as indipendent piece of UI;

React is a UI library, so you need other libraries for routing, exc.

Components

@lparolari
lparolari / symfony-troubleshooting.md
Created July 5, 2019 12:19
Symfony troubleshooting: awesome tips

Symfony Troubleshooting

SwiftMailer

Symfony has a nice mailing system provided as a plug-and-play package, but sometime some tweaks are needed.

Error Management

The swiftmailer do not fire exceptions, instead the send(message) method returns the number of successful recipients that can be zero (representing an issue). However, another sent method exists: sent(message, failedRecipients) which returns the list of failed email addresses.

Apache SSL Virtual Host

The easy way

Get the certificate

Go to https://www.sslforfree.com/ and follow the procedure in order to generate a signed certificate by Let's Encrypt Certificate Autority.

SSL VH

Build the virtual host for ssl domain (sse attached file example.com.ssl.conf)

@lparolari
lparolari / decode-pec-with-openssl.md
Created May 11, 2019 07:31
Decode your PEC attachments with a simple shell command.

PEC decoding without any client

Requirements

  • openssl installed on your computer;
  • a nice shell.

Usage

openssl smime -verify -in YOUR_FILE.EXT.p7m -inform der -noverify -signer Segnatura.xml -out textdata

Setup Laravel Environment

This reminder shows how to setup an environment for laravel without (intentionally) use a container like docker or a virtual machine like homestead.

Starting from scratch in linux, for setting up a laravel environment we will need first to setup the environment:

  • apache web server: sudo apt install apache2;
  • mysql server: sudo apt install mysql-server;
  • php and extensions: sudo apt install php7.X php-pear php-fpm php-dev php-zip php-curl php-xmlrpc php-gd php-mysql php-mbstring php-xml libapache2-mod-php;
  • you may need to disable mods of older versions of php in apache;
  • enable mod_rewrite: sudo a2enmod rewrite;