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 | |
$destination = "/home/user/backups"; | |
$filename = "db_backup.sql"; | |
$host = '127.0.0.1'; | |
$database = 'mydb'; | |
$password = 'mypass'; | |
$gdrive_folder = '0B2WMB4jNcJeRVTd6TTliZWVVSFE'; | |
// Dumps mysql database to a sql file called "db_backup.sql" |
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 | |
namespace App\Http\Controllers\Auth; | |
use Illuminate\Http\Request; | |
use App\Http\Controllers\Controller; | |
use Illuminate\Foundation\Auth\AuthenticatesUsers; | |
class AuthController extends Controller | |
{ |
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
<ion-input mask='(99) 9999-9999' [(ngModel)]='phone' type='text'></ion-input> |
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
function template($template, $array = []) | |
{ | |
$res = preg_match_all("/{{(.*?)}}/", $template, $m); | |
foreach ($m[1] as $i => $varname) { | |
$val = isset($array[trim($varname)])? $array[trim($varname)] : ''; | |
$template = str_replace($m[0][$i], sprintf('%s', $val), $template); | |
} | |
return $template; | |
} |
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
.table.table-ellipsis tbody td { | |
max-width: 100px; | |
overflow: hidden; | |
text-overflow: ellipsis; | |
white-space: nowrap | |
} |
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
/* | |
* Created by: Finik | |
* Copied from http://stackoverflow.com/questions/18422223/bootstrap-3-modal-vertical-position-center | |
*/ | |
.modal { | |
text-align: center; | |
} | |
@media screen and (min-width: 768px) { |
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
.modal.fade .modal-dialog{ | |
-webkit-transition: all .2s linear; | |
-o-transition: all .2s linear; | |
transition: all .2s linear; | |
opacity: 0; | |
transform: scale(1.08); | |
} | |
.modal.in .modal-dialog{ | |
opacity: 1; | |
transform: scale(1); |
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
module.exports = function(Model, options) { | |
var mergeQuery = require('loopback-datasource-juggler/lib/utils').mergeQuery; | |
var _ = require('lodash'); | |
var scopes = options.scopes || _.keys(Model.scopes); | |
var validScopes = {}; | |
_.each(Model.scopes, function(scope, name) { | |
if (scope.modelFrom === Model && scope.modelFrom === scope.modelTo) { |
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
[ | |
{ | |
"id": 1, | |
"name": "Acre", | |
"initials": "AC", | |
"code": 12, | |
"cities": [ | |
{ | |
"id": 27, | |
"name": "Acrel\u00e2ndia", |