Skip to content

Instantly share code, notes, and snippets.

View shuvroroy's full-sized avatar
💻
Code Artist

Shuvro Roy shuvroroy

💻
Code Artist
View GitHub Profile
# Makefile to set up the SSO playground environment
.PHONY: setup clean update-transistor-env update-reform-env update-tuple-env
setup:
@echo "Cleaning up exising directory..."
@if [ ! -f sso ]; then \
$(MAKE) clean name=sso; \
fi
@if [ ! -f transistor ]; then \
@shuvroroy
shuvroroy / intercom.blade.php
Created September 18, 2023 17:11 — forked from skeemer/intercom.blade.php
Example of Livewire's wire:navigate working with Intercom
<?php
/**
* The key to getting Intercom to work with wire:navigate is using an undocumented but well supported feature.
* My source for how I know they are supporting it: https://github.com/intercom/intercom-rails/issues/336
**
@if (config('intercom.app_id'))
<script>
// From Intercom docs
const APP_ID = "{{ config('intercom.app_id') }}";
@shuvroroy
shuvroroy / .env
Created January 6, 2022 11:57 — forked from PhiloNL/.env
Simple, fast, and resilient open-source WebSockets server using Soketi with SSL in less than 5 minutes
PUSHER_HOST=socket.yourdomain.com
PUSHER_APP_ID=unlock
PUSHER_APP_KEY=123
PUSHER_APP_SECRET=456
PUSHER_PORT=443
PUSHER_SCHEME=https
document.addEventListener('alpine:init', () => {
Alpine.store('breakpoint', {
listeners: {},
init() {
const breakpoints = {
sm: 640,
md: 768,
lg: 1024,
xl: 1280,
<?php
namespace Tests;
use Illuminate\Contracts\Auth\Authenticatable;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\ValidationException;
use Illuminate\Validation\Validator;
use Symfony\Component\HttpFoundation\ParameterBag;
use function PHPUnit\Framework\assertFalse;
@shuvroroy
shuvroroy / TestCase.php
Created September 12, 2020 17:39 — forked from lepikhinb/TestCase.php
Laravel 8 Model Factory resolver
<?php
namespace Tests;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Str;
use ReflectionClass;
use SplFileInfo;
<template>
<div v-click-outside="close">
<label v-if="label" class="form-label" @click="open">{{ label }}:</label>
<div class="relative">
<div ref="input" @click="open" @focus="open" @keydown.down.prevent="open" @keydown.up.prevent="open" :class="{ focus: show, error: error }" class="form-input pr-6" :tabindex="show ? -1 : 0">
<slot v-if="value"></slot>
<div v-else-if="data.length === 0" class="text-grey-600">No options found</div>
<div v-else class="text-grey-600">Click to choose…</div>
</div>
<button type="button" @click.stop="clear" v-if="value" tabindex="-1" class="absolute p-2 inline-block text-grey-500 hover:text-amber-700" style="right: 4px; top: 8px;">
@shuvroroy
shuvroroy / DateInput.vue
Created September 7, 2019 16:45 — forked from reinink/DateInput.vue
Pikaday Vue Component
<template>
<div>
<label v-if="label" class="form-label" :for="`date-input-${_uid}`">{{ label }}:</label>
<input v-bind="$attrs" class="form-input" :id="`date-input-${_uid}`" :class="{ error: error }" type="text" ref="input" :value="value" @change="change" @keyup="change">
<div v-if="error" class="form-error">{{ error }}</div>
</div>
</template>
<script>
import pikaday from 'pikaday'
https://symfony.com/doc/current/bundles/StofDoctrineExtensionsBundle/index.html