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
namespace App\Http\Controllers; | |
// .... | |
public static function sanitizeAndPrepareForRegexSearch($searchQuery) | |
{ | |
// General input sanitization | |
$sanitized = trim(filter_var($searchQuery, FILTER_SANITIZE_STRING)); | |
// Reserved chars for regex operator | |
$excludedChars = config('app.excluded_chars'); // ['(', ')', '[', ']', '#', '@', '?', '!', '_', '-', '/', '\\', '^', '~'] |
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
import { IncomingMessage } from 'http' | |
import { NextRequest } from 'next/server' | |
import { ClientConfig, AuthenticationResponse, APIError, Hit } from 'pirsch-sdk/types' | |
const referrerQueryParams = ['ref', 'referer', 'referrer', 'source', 'utm_source'] | |
const defaultBaseURL = 'https://api.pirsch.io' | |
const defaultTimeout = 5000 | |
const defaultProtocol = 'http' | |
const authenticationEndpoint = '/api/v1/token' |
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\Livewire; | |
use Livewire\Component; | |
use App\Models\User; | |
class CreateComment extends Component | |
{ | |
public $mentionables; |
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\Livewire; | |
use Livewire\Component; | |
use App\Http\Livewire\Concerns\FormRequest; | |
class ExampleUsage extends Component | |
{ | |
use FormRequest; |
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
name: CI/CD workflow | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
testing: |
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
<? | |
// | |
// AUTO KEYWORD-BASED FOLLOWER CURATION BOT (by @levelsio) | |
// | |
// File: twitterFollowerCuratorBot.php | |
// | |
// Created: May 2021 | |
// License: MIT | |
// |
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
name: CD | |
on: | |
release: | |
types: | |
- released | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 |
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\Livewire\Stats; | |
use Illuminate\Support\Facades\DB; | |
use Livewire\Component; | |
class DistanceByYear extends Component | |
{ | |
public $chartId; |
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 | |
trait Sortable | |
{ | |
/** | |
* This function receives a $newOrder array parameter, which contains the order in which | |
* we should sort our items after being dragged in the UI. The format of the $newOrder is: | |
* | |
* [ | |
* newIndex => [ |
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\Charts; | |
use App\Support\Livewire\ChartComponentData; | |
use ConsoleTVs\Charts\Classes\Chartjs\Chart; | |
/** | |
* Class WanSpeedTestsChart | |
* |
NewerOlder