Skip to content

Instantly share code, notes, and snippets.

View royteusink's full-sized avatar

Roy Teusink royteusink

View GitHub Profile
@jordienr
jordienr / tailwind.config.ts
Created July 15, 2023 09:10
Tailwind SVG Grid Background
// Remember to install mini-svg-data-uri
// Follow me on twitter for memes @jordienr
import { type Config } from "tailwindcss";
const {
default: flattenColorPalette,
} = require("tailwindcss/lib/util/flattenColorPalette");
const svgToDataUri = require("mini-svg-data-uri");
export default {
@phanan
phanan / MyList.vue
Last active February 2, 2023 17:10
Virtual scroller with Vue Composition API
<template>
<VirtualScroller v-slot="{ item }" :item-height="35" :items="myMassiveArray">
<div :item="item" :key="item.id">{{ item.details.i.guess? }}</div>
</VirtualScroller>
</template>
@DavidWells
DavidWells / javascript-proxy-as-rest-client.js
Last active May 12, 2024 14:24
Using a javascript proxy as low code REST client
/* Using a JavaScript proxy for a super low code REST client */
// via https://dev.to/dipsaus9/javascript-lets-create-aproxy-19hg
// also see https://towardsdatascience.com/why-to-use-javascript-proxy-5cdc69d943e3
// also see https://github.com/fastify/manifetch
// also see https://github.com/flash-oss/allserver
// and https://gist.github.com/v1vendi/75d5e5dad7a2d1ef3fcb48234e4528cb
const createApi = (url) => {
return new Proxy({}, {
get(target, key) {
@lukaskleinschmidt
lukaskleinschmidt / HandleInertiaRequests.php
Last active June 3, 2024 03:54
inertia-laravel multiple root views
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Inertia\Middleware;
class HandleInertiaRequests extends Middleware
{
@vivgui
vivgui / bigger-tailwindcss-spacing-scale.js
Last active August 28, 2023 21:55
Here's a bigger spacing scale for TailwindCSS.
spacing: {
"13": '3.25rem',
"15": '3.75rem',
"17": '4.25rem',
"18": '4.5rem',
"19": '4.75rem',
"76": "19rem",
"84": "21rem",
"88": "22rem",
"92": "23rem",
@royteusink
royteusink / vue-sanctum.md
Last active December 31, 2020 13:21
vue cli + laravel sanctum

CORS issues with local development setup Laravel Sanctum with Vue3 cli

app.yourdomain.test

vue app created with vue cli.

axios.create({
  baseURL: process.env.VUE_APP_API_URL,
  withCredentials: true
@vicgonvt
vicgonvt / deployment_guide.md
Last active March 17, 2024 06:51
Deployment Guide for Ubuntu Server from Scratch with Laravel
@Ron-e
Ron-e / bash.txt
Created September 2, 2018 10:09
remove services before installing Sentora
yum remove -y httpd httpd-devel php php-devel php-gd php-mbstring php-intl php-mysql php-xml php-xmlrpc php-mcrypt php-imap php-pear php-mysql php-cli php-common php5-dev myself mysql dovecot-mysql MariaDB MariaDB-common MariaDB-compat MariaDB-server phpMyAdmin postfix dovecot dovecot-mysql dovecot-pigeonhole sendmail ProFTPd proftpd proftpd-mysql vsftpd named bind bind-utils bind-libs bind9 pdns pdns-backend-mysql pdns-server pdns-server-backend-mysql webalizer crontabs
yum clean all
yum install -y curl
@blackcater
blackcater / diagrams.md
Created July 6, 2018 16:45
Markdown Diagrams

Diagrams

Markdown Preview Enhanced supports rendering flow charts, sequence diagrams, mermaid, PlantUML, WaveDrom, GraphViz, Vega & Vega-lite, Ditaa diagrams. You can also render TikZ, Python Matplotlib, Plotly and all sorts of other graphs and diagrams by using Code Chunk.

Please note that some diagrams don't work well with file exports such as PDF, pandoc, etc.

Flow Charts

This feature is powered by flowchart.js.

@manifestinteractive
manifestinteractive / multiple-npm-accounts.md
Created September 2, 2017 03:41
Multiple NPM Accounts on Single Machine

Multiple NPM Accounts on Single Machine

Create Custom NPM Config

If you do not already have a local ~/.npmrc file, you need to create one.

  1. Open a terminal window
  2. Run npm login