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 Mail; | |
// views/emails/reset.blade.php шаблон | |
// user,info передаются в шаблон | |
Mail::send('emails.reset', ['user' => $user, 'info' => $info], function ($m) use ($user) { | |
$m->from(env('MAIL_FROM')); | |
$m->to($user->email)->subject('Запрос в службу поддержки'); | |
}); |
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 | |
public function setSaratov() { | |
$this->region = 'saratov'; | |
$this->links = [ | |
'http://www.saratov.vybory.izbirkom.ru/region/region/saratov?action=show&tvd=100100067796072&vrn=100100067795849®ion=64&global=true&sub_region=64&prver=0&pronetvd=0&vibid=26420001135285&type=233', | |
'http://www.saratov.vybory.izbirkom.ru/region/saratov?action=show&global=true&root=642000026&tvd=26420001135271&vrn=100100067795849&prver=0&pronetvd=0®ion=64&sub_region=64&type=233&vibid=26420001135271', | |
'http://www.saratov.vybory.izbirkom.ru/region/region/saratov?action=show&tvd=100100067796069&vrn=100100067795849®ion=64&global=true&sub_region=64&prver=0&pronetvd=0&vibid=26420001135250&type=233', | |
'http://www.saratov.vybory.izbirkom.ru/region/region/saratov?action=show&tvd=100100067796069&vrn=100100067795849®ion=64&global=true&sub_region=64&prver=0&pronetvd=0&vibid=26420001135249&type=233', | |
'http://www.saratov.vybory.izbirkom.ru/region/region/saratov?action=show&tvd=100100067796069&vrn=100100067795849®ion=64&g |
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
<html> | |
<head> | |
<style> | |
#console{ | |
border:1px solid lightgreen; | |
padding:10px; | |
} | |
</style> | |
</head> | |
<body> |
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
**/ | |
const int c = 261; | |
const int d = 294; | |
const int e = 329; | |
const int f = 349; | |
const int g = 391; | |
const int gS = 415; | |
const int a = 440; | |
const int aS = 455; |
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
int ledPin = 13; | |
//led for visualization (use 13 for built-in led) | |
int speakerPin = 11; | |
//speaker connected to one of the PWM ports | |
#define c 261 | |
#define d 294 | |
#define e 329 | |
#define f 349 |
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 | |
// app/Http/Middleware/AntiDos.php | |
namespace App\Http\Middleware; | |
use Illuminate\Http\Request; | |
use Closure; | |
use File; | |
class AntiDos | |
{ |
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\Services; | |
use Cache; | |
use Storage; | |
class ElectionService { | |
/** |
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 | |
... | |
private function _appendJson($file, $data, $first = false) { | |
$fd = fopen($file, 'r+'); | |
fseek($fd, -1, SEEK_END); | |
fwrite($fd, ($first ? '' : ',') . json_encode($data) . ']'); | |
fclose($fd); | |
} | |
// wrong file format. Just measuring speed |
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
#include <ESP8266WiFi.h> //Содержится в пакете | |
#include <ESP8266WebServer.h> //Содержится в пакете | |
#include <ESP8266SSDP.h> | |
#include <EEPROM.h> | |
// IP адрес устройства | |
IPAddress apIP(192, 168, 4, 1); | |
// Web интерфейс для устройства | |
ESP8266WebServer HTTP(80); |
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 Request; | |
use Validator; | |
use \GuzzleHttp\Client; | |
// ... in the boot() | |
Validator::extend('recaptcha', function($attribute, $value, $parameters, $validator) { | |
if(!$value) { | |
return false; | |
} |