This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Using show() | |
$scope.garageToggle = function() { | |
$scope.data = { hasWorkEntry: true }; | |
$ionicPopup.show({ | |
title: 'Are you sure you want to open the garage?', | |
content: '<ion-checkbox ng-model="data.hasWorkEntry" ng-checked="data.hasWorkEntry">Mark as Work Entry?</ion-checkbox>', | |
scope: $scope, | |
buttons: [ | |
{text: 'Cancel'}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// src/Controller/AppController.php | |
$this->loadComponent('Auth', [ | |
'authenticate' => [ | |
'Form' => [ | |
'fields' => [ | |
'username' => 'email', | |
'password' => 'password' | |
], | |
// Older "scope" / "contain" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# replace 'pt_BR' for the desired language | |
sed -i -e 's/# pt_BR.UTF-8 UTF-8/pt_BR.UTF-8 UTF-8/' /etc/locale.gen && \ | |
echo 'LANG="pt_BR.UTF-8"'>/etc/default/locale && \ | |
dpkg-reconfigure --frontend=noninteractive locales && \ | |
update-locale LANG=pt_BR.UTF-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class EloquentModel extends Illuminate\Database\Eloquent\Model { | |
public function getConnection() | |
{ | |
// In case of Phalcon 3.4 | |
$di = new \Phalcon\Di(); | |
$config = $di->getDefault()->getShared('config'); | |
$db = $config['database']; | |
$host = explode(':', $db->host); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8 | |
sudo sh -c "echo 'deb [arch=amd64,i386] https://mirrors.evowise.com/mariadb/repo/10.2/ubuntu '$(lsb_release -cs)' main' > /etc/apt/sources.list.d/MariaDB-10.2.list" | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 | |
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list | |
sudo dpkg-reconfigure locales | |
sudo apt update | |
sudo apt upgrade | |
sudo apt install unzip | |
sudo apt install mariadb-server mariadb-client |