This file contains hidden or 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 | |
| use Illuminate\Database\Seeder; | |
| /* | |
| To run on default db:seed add call to databases/seed/DatabaseSeeder.php | |
| ... | |
| public function run() | |
| { | |
| ... |
This file contains hidden or 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 | |
| use Illuminate\Support\Facades\Schema; | |
| use Illuminate\Database\Schema\Blueprint; | |
| use Illuminate\Database\Migrations\Migration; | |
| class CreatePatientsTable extends Migration | |
| { | |
| /** | |
| * Run the migrations. |
This file contains hidden or 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 | |
| $factory->define(App\Patient::class, function (Faker\Generator $faker) { | |
| $_marital_statuses = [ | |
| 'Solteiro(a)', | |
| 'Casado(a)', | |
| 'Divorciado(a)', | |
| 'Viúvo(a)', | |
| 'Separado(a)', |
This file contains hidden or 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\Repositories; | |
| use App\Patient; | |
| use Validator; | |
| use Illuminate\Support\Facades\Input; | |
| class PatientRepository | |
| { | |
| /** |
This file contains hidden or 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; | |
| use App\State; | |
| use App\Patient; | |
| use Illuminate\Http\Request; | |
| use Illuminate\Support\Facades\Input; | |
| use App\Repositories\PatientRepository; |
This file contains hidden or 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
| #!/usr/bin/python | |
| import RPi.GPIO as GPIO | |
| import time | |
| GPIO.setmode(GPIO.BCM) | |
| GPIO.setup(4, GPIO.OUT) | |
| GPIO.output(4, GPIO.HIGH) | |
| time.sleep(0.5) | |
| GPIO.cleanup() |
This file contains hidden or 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 | |
| // Hamachi Website - https://www.vpn.net/ | |
| $command = "ifconfig ham0 | grep 'inet end.' | cut -d: -f2 | awk '{ print $1}'"; | |
| $ip = shell_exec($command); | |
| echo "Hamachi ip: ".$ip; |
This file contains hidden or 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
| #!/bin/sh | |
| # | |
| # Save in: /etc/update-motd/11-show-ip | |
| # | |
| IP="$(ip address show eth1 | grep 'inet ' | sed -e 's/^.*inet //' -e 's/\/.*$//')" | |
| echo "" | |
| echo "Show ip/local domain:" | |
| echo "- - - - - - - - - - - - - " |
This file contains hidden or 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 | |
| $from = 'you-email@gmail.com'; | |
| $to = 'my-email@gmail.com'; | |
| $subject = 'subject email'; | |
| $message = 'email message here'; | |
| $headers = 'From: '.$from . "\r\n" . | |
| 'Reply-To: '.$from . "\r\n" . | |
| 'X-Mailer: PHP/' . phpversion(); |
This file contains hidden or 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 | |
| /*Four:*/ | |
| //in php script you have adjust to receive the correct parameter: $_POST['email'] | |
| include 'briteverify.com.class.php'; | |
| $brite = new Brite_Verify($_POST['email'], 'YOU-API-KEY'); | |
| $result = $brite->verify(); | |
| echo $result; |