This short doc shows how to build rust to be used by flutter/android app.
Inspired by hyousef's work but added some details for the workflow.
Docs:
Rust error handling is nice but obligatory. Which makes it sometimes plenty of code.
Functions return values of type Result that is "enumeration". In Rust enumeration means complex value that has alternatives and that alternative is shown with a tag.
Result is defined as Ok or Err. The definition is generic, and both alternatives have
The aim of Dart FFI project (tracked as Issue #34452) is to provide a low boilerplate, low ceremony & low overhead way of interoperating with native C/C++ code.
The motivation behind this project is twofold:
First of all, please note that token expiration and revoking are two different things.
A JWT token that never expires is dangerous if the token is stolen then someone can always access the user's data.
Quoted from JWT RFC:
<?php | |
use App\Extensions\Relations\BelongsToMany; | |
abstract class AbstractModel extends Model | |
{ | |
/* | |
* This is copied AS IS from \Illuminate\Database\Eloquent\Model@belongsToMany but instead uses our own BelongsToMany class | |
*/ |
#!/bin/bash | |
cat << EOF | |
########################################################### | |
# Workaround adb disconnecting issue on macOS Sierra | |
# | |
# More info: | |
# https://code.google.com/p/android/issues/detail?id=219085 | |
# credits to: [email protected], [email protected] | |
########################################################### |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
<!DOCTYPE html> | |
<!-- | |
Copyright (c) 2016, <your name>. All rights reserved. Use of this source code | |
is governed by a BSD-style license that can be found in the LICENSE file. | |
--> | |
<html> | |
<head> | |
<meta charset="utf-8"> |
<?php | |
namespace App\Criteria; | |
use Illuminate\Database\Eloquent\Model; | |
use Illuminate\Http\Request; | |
use Prettus\Repository\Contracts\RepositoryInterface; | |
use Prettus\Repository\Contracts\CriteriaInterface; | |
/** |
#!/bin/sh | |
wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.9-osx10.10-x86_64.tar.gz | |
tar xfvz mysql-5.7* | |
echo "stopping mamp" | |
sudo /Applications/MAMP/bin/stop.sh | |
sudo killall httpd mysqld | |
echo "creating backup" |