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 models\Instant\Action; | |
interface ActionInterface | |
{ | |
/** | |
* Executes action | |
* | |
* @param array $args |
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 Ramsey\Uuid\Uuid; | |
class Manager | |
{ | |
const DEFAULT_CONSUME_TIMEOUT = 12 * 60 * 60; | |
const DEFAULT_BLPOP_INTERVAL = 30; | |
/** @var \Redis */ |
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
-- select all query -- | |
SELECT b.bookTitle, a.authorName FROM book b | |
INNER JOIN author_book ab ON ab.bookID = b.bookID | |
INNER JOIN author a ON a.authorID = ab.authorID | |
ORDER BY b.bookTitle | |
-- select all with authors concantenated -- | |
SELECT b.bookTitle, GROUP_CONCAT(a.authorName) authors FROM book b |
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
import React, { Component, PropTypes } from 'react'; | |
class FormClass extends Component { | |
static propTypes = { | |
onSubmit: PropTypes.func.isRequired, | |
setRef: PropTypes.func, | |
}; | |
constructor(props) { | |
super(props); |
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 | |
class EmailManager | |
{ | |
public function confirmEmail(User $user): User | |
{ | |
$user = \DB::transaction(function () use ($user) { | |
$user = User::lockForUpdate()->findOrFail($user->id); | |
$user->email_confirmed = true; | |
$user->save(); |
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 | |
declare(strict_types=1); | |
namespace App\Transactional; | |
use Illuminate\{ | |
Database\DatabaseManager, | |
}; |
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 fs = require('fs'); | |
const path = require('path'); | |
const { fork } = require('child_process'); | |
const os = require('os'); | |
console.log(os.cpus().length); | |
const NUM_WORKERS = os.cpus().length; | |
const KEYSTORE_DIR = './keystores'; // Replace with your directory path | |
const RESULT_DIR = './results'; // Directory for storing results |