Skip to content

Instantly share code, notes, and snippets.

@vansteen
vansteen / tall-rich-text.blade.php
Last active January 24, 2024 11:27 — forked from humayunjavaid/form.blade.php
Trix Integration with Livewire And Alpine js
/* Blade Component */
<div
x-data="{
value: @entangle($attributes->wire('model')),
isFocused() { return document.activeElement !== this.$refs.trix },
setValue() { this.$refs.trix.editor.loadHTML(this.value) },
}"
x-init="setValue(); $watch('value', () => isFocused() && setValue())"
@vansteen
vansteen / tall-date-picker.blade.php
Last active January 24, 2024 11:27 — forked from humayunjavaid/date-picker.blade.php
Pickaday Integration with Laravel Livewire And Alpine js
<div
x-data="{ value : @entangle($attributes->wire('model')) }"
x-on:change="value = $event.target.value"
x-init="
new Pikaday({ field: $refs.input, 'format': 'MM/DD/YYYY' });"
>
<div class="relative mt-2">
<input
{{ $attributes->whereDoesntStartWith('wire:model') }}
x-ref="input"
@vansteen
vansteen / gist:3199403
Last active October 7, 2015 17:18
OSX: Enable Lion's Airdrop on unsupported Wifi cards / USB dongles
# Lion includes a new technology called "AirDrop" which is Apple's name for adhoc wifi data exchange.
#
# When two machines that both run Lion are visible to each other (nearby , "ad hoc networked"),
# users can launch Finder, go to "Airdrop" in the sidebar and will see each others Machine.
# You then can simply drag and drop all sort of documents onto the icon of the mac next yours
# without having to think about setting up a network or dig deeply into Networking details.
#
# This new technology is not enabled for all wifi "Airport" cards and never for 3rd party devices
# (usb dongles , pci cards etc that have OS X drivers available)
#
@vansteen
vansteen / gist:3199385
Last active August 30, 2017 18:15
OSX: Permanently show or hide an application from the dock
# Just used this to hide “ScanSnap Manager.app” or "iTerm.app" from my Dock
# Quit and re-start your app after applying the setting to see it in effect.
# Hide Application from Dock:
defaults write /Applications/Application.app/Contents/Info LSUIElement 1
# Show Application in Dock: