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 declare(strict_types=1); | |
namespace App\Http\Controllers; | |
use Mail; | |
use Exception; | |
use Spatie\Regex\Regex; | |
use App\Models\Customer; | |
use App\Mail\NewVoicemail; | |
use App\Models\Voicemailbox; |
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
use std::fs; | |
use std::collections::HashMap; | |
use std::time::Instant; | |
use itertools::Itertools; | |
fn apply_mapping(current: u32, map: &Mapping) -> u32 { | |
let mut value: u32 = current; | |
for entity in &map.mappings { | |
if value >= entity.src && value < entity.src + entity.range { |
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 os | |
import re | |
import random | |
import subprocess | |
def run_command(cmd): | |
result = subprocess.run(cmd, stdout=subprocess.PIPE, shell=True) | |
return result.stdout.decode('utf-8').strip() | |
def get_current_bg(output): |
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
set-option -sa terminal-overrides ",xterm*:Tc" | |
set -g mouse on | |
set -g history-limit 10000 | |
set -g base-index 1 | |
set -g pane-base-index 1 | |
set-window-option -g pane-base-index 1 | |
set-option -g renumber-windows on | |
unbind C-b |
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\Controls; | |
use Livewire\Component; | |
class Accordion extends Component | |
{ | |
protected $listeners = ['refreshAccordion' => '$refresh']; |
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
<div x-cloak x-data="{ | |
hourOptions: [...Array(12+1).keys()].slice(1), | |
minuteOptions: [...Array(60).keys()], | |
isHourHighlighted: function(option) { return this.hourHighlighted === option }, | |
isHourSelected: function(option) { return this.hourValue === option }, | |
isMinuteHighlighted: function(option) { return this.minuteHighlighted === option }, | |
isMinuteSelected: function(option) { return this.minuteValue === option }, | |
highlightHourOption: function(option) { this.hourHighlighted = option }, | |
unHighlightHourOption: function(option) { this.hourHighlighted = null }, | |
highlightMinuteOption: function(option) { this.minuteHighlighted = option }, |
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\Traits; | |
use Illuminate\Database\Eloquent\Model; | |
use Illuminate\Support\Facades\Gate; | |
use Illuminate\Support\Str; | |
trait WithEdits | |
{ |
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
@props([ | |
'categories' => null, | |
'options' => [] | |
]) | |
<div class="relative" x-data="accordianDropdown({ | |
categories: {{ $categories }}, | |
options: {{ $options }} | |
})" tabindex="0"> | |
<span x-show="selectedItem" class="absolute inset-y-0 left-0 pl-4 flex items-center text-cyan-600" x-html="getSelectedItemIcon()"></span> | |
<input id="combobox" x-ref="input" type="text" x-model="search" @keydown="startEditing()" class="w-full rounded-md border border-gray-300 bg-white py-2 pl-10 pr-12 shadow-sm focus:border-cyan-500 focus:outline-none focus:ring-1 focus:ring-cyan-500 sm:text-sm" role="combobox" aria-controls="options" aria-expanded="false"> |
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
export default { | |
agents: [], | |
id: null, | |
ringing: false, | |
onCall: false, | |
statusMessage: 'Initialising...', | |
callTimer: '', | |
agentStatus: { | |
Idle: 'Available', | |
Break: 'Break', |
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 Alpine from 'alpinejs' | |
import select from './components/select' | |
window.Alpine = Alpine | |
Alpine.data('select', select) | |
Alpine.start() |
NewerOlder