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
version: "3.7" | |
x-logging: | |
&default-logging | |
options: | |
max-size: '12m' | |
max-file: '5' | |
driver: json-file | |
x-healthcheck: | |
&default-healthcheck |
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
# vim:fileencoding=utf-8:ft=conf:foldmethod=marker | |
Fonts {{{ | |
#: kitty has very powerful font management. You can configure | |
#: individual font faces and even specify special fonts for particular | |
#: characters. | |
# font_family monospace | |
# bold_font auto |
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 App\Notifications; | |
use Illuminate\Bus\Queueable; | |
use Illuminate\Notifications\Notification; | |
use Illuminate\Contracts\Queue\ShouldQueue; | |
use Illuminate\Notifications\Messages\MailMessage; | |
use Illuminate\Notifications\Messages\SlackMessage; |
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
document.addEventListener("DOMContentLoaded", function () { | |
setInterval(keepTokenAlive, 1000 * 60 * 15); // every 15 mins | |
function keepTokenAlive() { | |
axios.get('/keep-token-alive') | |
.then(response => { | |
let token = response.data.token; | |
window.axios.defaults.headers.common['X-CSRF-TOKEN'] = response.data.token; | |
const formFields = document.querySelectorAll('input[name="_token"]'); |
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
# /storage/.config/system.d/minio.service | |
[Unit] | |
Description=minio server | |
# if we do network mounts like here we *require* 'network-online.service' | |
# which checks if the network is online | |
Requires=network-online.service | |
# our scripts must start *after* 'network-online.service', on timeout and if |
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
// npm install pikaday | |
// resources/assets/js/app.js | |
import Pikaday from "pikaday"; | |
import "pikaday/css/pikaday.css"; | |
Vue.directive("pikaday", { | |
bind: (el, binding) => { | |
el.pikadayInstance = new Pikaday({ | |
field: el, | |
onSelect: () => { |
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
Notification::assertSentTo($user, MyNotification::class, function ($notification) use ($user) { | |
$markdown = app(\Illuminate\Mail\Markdown::class); | |
$mail = $notification->toMail($user); | |
dd($markdown->render($mail->markdown, $mail->data())); | |
}); |
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
# from : https://forum.libreelec.tv/thread/5074-wifi-issues-on-rpi-3-poor-speed-and-latency-solution/#codeLine_1_3e8919 | |
# first install the 'network tools' add-on from the kodi repository then create a /storage/.config/autostart.sh file with | |
# this as the contents. | |
# then reboot the pi. runnning 'iwconfig' should now show the power-management as being off. | |
/storage/.kodi/addons/virtual.network-tools/bin/iw wlan0 set power_save off |
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
twitter.com##body:not(.NotificationsPage) li.stream-item:has(.Icon--heartBadge) |
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 | |
/* | |
This is a contrived example - but I'm working on a large PHPv4 style legacy codebase | |
and it's full of this kind of code (only much, much worse - c70,000 lines of raw | |
mysql calls etc). | |
So in this case I could use the 'namespace' mocking trick to mock all of the | |
functions - but to test things like "everything passes", "connection works, but TLS | |
fails", "password is wrong" etc, seems hard to do without the tests | |
getting really quite nasty. Combined with all the raw mysql* function calls it |