Skip to content

Instantly share code, notes, and snippets.

View acidjazz's full-sized avatar
🎯
Focusing

kevin olson acidjazz

🎯
Focusing
View GitHub Profile
@acidjazz
acidjazz / ExampleController.php
Last active January 6, 2022 22:43
smart table export service
<?php
class UserController extends Controller
{
/**
* Display a listing of the resource.
*
* @param Request $request
* @return Response|JsonResponse
* @throws AuthorizationException
@acidjazz
acidjazz / error.txt
Created December 10, 2021 02:01
Ineffective mark-compacts - v16.13.1
[4/5] 🔗 Linking dependencies...
warning "eslint-config-oclif-typescript > eslint-config-xo-space@0.20.0" has incorrect peer dependency "eslint@^5.3.0".
warning "eslint-config-oclif-typescript > @typescript-eslint/parser@2.34.0" has incorrect peer dependency "eslint@^5.0.0 || ^6.0.0".
warning "eslint-config-oclif-typescript > @typescript-eslint/eslint-plugin@2.34.0" has incorrect peer dependency "eslint@^5.0.0 || ^6.0.0".
<--- Last few GCs --->
[13300:0x128008000] 54578 ms: Mark-sweep 4042.3 (4135.2) -> 4028.0 (4134.4) MB, 758.5 / 0.0 ms (average mu = 0.128, current mu = 0.054) allocation failure scavenge might not succeed
[13300:0x128008000] 55066 ms: Mark-sweep 4043.8 (4134.4) -> 4031.1 (4137.7) MB, 461.7 / 0.0 ms (average mu = 0.103, current mu = 0.053) allocation failure scavenge might not succeed
May 3, 2017 at 12:34 PM
From Apple
2. 3 Performance: Accurate Metadata
4. 2 Design: Minimum Functionality
Guideline 4.2 - Design
Thank you for your resubmission. Your app continues to provide a limited user experience as it is still not sufficiently different from a mobile browsing experience. As such, the experience it provides is similar to the general experience of using Safari. Including iOS features such as push notifications, Core Location, and sharing do not provide a robust enough experience to be appropriate for the App Store.
Next Steps
lottie (): void {
if (!process.browser || !window.lottie) return
const lottie = window.lottie
const container = this.$refs.darkMode as HTMLElement
this.darkMode = lottie.loadAnimation({
container,
renderer: 'svg',
path: '/json/darkMode.json',
loop: false,
autoplay: false,
<?
Schema::create('orders', function (Blueprint $table) {
$table->id();
$table->string('table')->nullable();
$table->foreignIdFor(Rst::class)->constrained();
$table->foreignIdFor(Loc::class)->constrained();
});
Schema::create('order_menu', function (Blueprint $table) {
static priceFromCartChoices (rst: Rst, menuId: number, cartChoices: CartChoices, quantity: number) {
const options = this.choicesCombined(rst, menuId).map(c => c.options).flat() as Options
const ids = cartChoices.map(c => c.options).flat()
const selects = options.filter(o => ids.includes(o.id) && o.price) as OptionsWithPrices
const extras = selects.reduce((a, b) => a + b.price, 0)
return (this.menuFromId(rst, menuId).price + extras) * quantity
}
@acidjazz
acidjazz / ImageUpload.vue
Created August 29, 2021 07:17
image upload
<template>
<div class="w-64 h-52 flex justify-center items-center border-2 border-gray-300 border-dashed rounded-md">
<div class="space-y-1 text-center">
<icon-images class="mx-auto w-12 h-12" />
<div class="flex text-sm text-gray-600">
<label for="file-upload" class="relative cursor-pointer bg-white rounded-md font-medium text-fuchsia-600 hover:text-indigo-500 focus-within:outline-none focus-within:ring-2 focus-within:ring-offset-2 focus-within:ring-indigo-500">
<span>Upload an image</span>
<input
id="file-upload"
name="file-upload"
@acidjazz
acidjazz / ImageController.php
Created August 27, 2021 21:37
store a file to s3
<?
public function store(Request $request): Response|JsonResponse
{
$this
->option('file', 'required|file|max:10000000')
->option('type', 'nullable|in:' . Image::ABLES)
->option('id', 'nullable')
->verify();
/** @var UploadedFile $file */
@acidjazz
acidjazz / webhook.php
Created August 8, 2021 01:19
webhooks
<?
public function test()
{
if ($this->hook->type === 'discord') {
Http::post(
$this->hook->url,
[
'username' => 'fume',
'avatar_url' => 'https://fume.app/fume-light-full.png',
'embeds' => [
@acidjazz
acidjazz / IndefinteArticle.php
Last active July 28, 2021 21:45
Indefinte Articles in PHP
<?php
namespace App\Services;
class IndefiniteArticle
{
public static function a($text): string
{
return self::indefiniteArticleForm($text);