#List of countries
It's time someone compiled a list of countries to use within a web application. This gist attempts to make a first move at that.
I've also compiled a list of nationalities
| // Make sure that you are in same web directory as your project root | |
| // Install guzzle with composer | |
| // composer require guzzlehttp/guzzle:~6.0 | |
| <?php | |
| require_once('vendor/autoload.php'); //don't add this if you are using a framework | |
| use GuzzleHttp\Client; | |
| use GuzzleHttp\Psr7\Request; |
| # This is just a cheat sheet: | |
| # On production | |
| sudo -u postgres pg_dump database | gzip -9 > database.sql.gz | |
| # On local | |
| scp -C production:~/database.sql.gz | |
| dropdb database && createdb database | |
| gunzip < database.sql.gz | psql database |
| $nationals = array( | |
| 'Afghan', | |
| 'Albanian', | |
| 'Algerian', | |
| 'American', | |
| 'Andorran', | |
| 'Angolan', | |
| 'Antiguans', | |
| 'Argentinean', | |
| 'Armenian', |
| # Compiled source # | |
| ################### | |
| *.com | |
| *.class | |
| *.dll | |
| *.exe | |
| *.o | |
| *.so | |
| # Packages # |
#List of countries
It's time someone compiled a list of countries to use within a web application. This gist attempts to make a first move at that.
I've also compiled a list of nationalities
It's time someone compiled a list of nationalities to use within a web application. This gist attempts to make a first move at that.
##List of countries
I've also compiled a list of countries
A complete gdb to lldb command map.
(lldb) po responseObject
(lldb) po [responseObject objectForKey@"state"]
This article describes an implementation of multi-tenancy using Yii and MySQL. “Multi-tenancy” is but one (yet crucial) aspect of SaaS applications; refer to the IBM document Convert your web application to a multi-tenant SaaS solution for more information on what else makes a webapp a SaaS application.
Moreover, there are three main architectures for multi-tenant databases: separate database, separate schemas and a single database. Refer to the Microsoft document Multi-Tenant Data Architecture for more information.
As MySQL doesn’t have schemas (at least the same way MS SQL Server and Oracle do) the only choices are a separate database for each tenant and single database with “commingled” tenant data. SaaS applications with a relatively small number of tenants can be easily managed with a database for each one, but for large numbers of tenants its
| <?php | |
| return [ | |
| 'components' => [ | |
| 'db' => [ | |
| 'class' => '\yii\db\Connection', | |
| 'dsn' => 'mysql:host=127.0.0.1;dbname=demo', | |
| 'username' => 'root', | |
| 'password' => '', | |
| 'charset' => 'utf8', |