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
#!/bin/bash | |
# Install deps | |
apt install jq -y | |
# Define the URL of the Cloudflare IPs API | |
api_url="https://api.cloudflare.com/client/v4/ips" | |
# Define the output file | |
output_file="/etc/nginx/snippets/cloudflare.conf" |
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\Models\Traits; | |
use Illuminate\Contracts\Database\Eloquent\Builder; | |
trait OrderByArrayScope | |
{ | |
public function scopeOrderByArray(Builder $query, string $key, array $values, string $direction = 'ASC', bool $prefix = true) | |
{ |
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 { SearchableObject, Path } from '@clickbar/dot-diver'; | |
import { UnwrapRef } from 'vue'; | |
export const defaultAutosaveDebounce = 750; | |
export const defaultAutosubmitDebounce = 750; | |
type FormOptions< | |
T extends SearchableObject, | |
P extends Path<T> & string = Path<T> & string, | |
> = Parameters<typeof useForm<T, P>>[0]; |
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 | |
use Illuminate\Database\Migrations\Migration; | |
use Doctrine\DBAL\Schema\AbstractSchemaManager as DoctrineSchemaManager; | |
use Doctrine\DBAL\Types\IntegerType; | |
use Illuminate\Database\Schema\Blueprint; | |
use Illuminate\Database\Schema\Builder as SchemaBuilder; | |
use Symfony\Component\Console\Output\ConsoleOutput; | |
/** |
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
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.MapboxDraw = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){ | |
"use strict"; | |
var runSetup = require('./src/setup'); | |
var setupOptions = require('./src/options'); | |
var setupAPI = require('./src/api'); | |
var Constants = r |
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
var canvas = document.createElement("canvas"); | |
try { gl = canvas.getContext("webgl"); } | |
catch (x) { gl = null; } | |
if (gl == null) { | |
try { gl = canvas.getContext("experimental-webgl"); experimental = true; } | |
catch (x) { gl = null; } | |
} | |
gl = !!gl; |