Skip to content

Instantly share code, notes, and snippets.

View alexbowers's full-sized avatar

Alex Bowers alexbowers

View GitHub Profile
@phroggyy
phroggyy / start.sh
Last active February 7, 2019 11:24
#!/bin/bash
docker ps --format "{{.Names}} {{ .Ports }}" | sed -e 's/_/-/g' | perl -n -e'/^([\w-]+).+:(\d+)->(\d+)/ && print "{\"name\":\"$1\",\"host\":\"$2\",\"container\":\"$3\"}\n"' | jq -r -s 'map(select(.container == "80")) | map(.name + ".test:443 {\n tls self_signed\n proxy / 127.0.0.1:" + .host + "\n}\n") | .[]' > Caddyfile
caddy
@JacobBennett
JacobBennett / CheckboxIndicator.vue
Created November 12, 2018 20:34
Progress Indicator
<template>
<section>
<span class="circle" :class="{current: current, completed: complete}">
<span v-if="complete" class="fa fa-check u-icon__inner text-white"></span>
</span>
<small class="description"><slot></slot></small>
</section>
</template>
<script>
@stidges
stidges / tailwind.itermcolors
Last active November 30, 2023 21:00
An iTerm2 color scheme based on the Tailwind CSS color scheme (https://tailwindcss.com/docs/colors)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.17254902422428131</real>
@reinink
reinink / webpack.mix.js
Created November 20, 2017 13:19
Using Purgecss with Tailwind and Laravel Mix
let cssImport = require('postcss-import')
let cssNext = require('postcss-cssnext')
let glob = require('glob-all')
let mix = require('laravel-mix')
let purgeCss = require('purgecss-webpack-plugin')
let tailwind = require('tailwindcss')
mix.js('resources/assets/js/app.js', 'public/js')
.postCss('resources/assets/css/app.css', 'public/css/app.css', [
cssImport(),
@Radostin
Radostin / twitter.html
Created November 6, 2017 20:25
Twitter Mockup with TailwindCSS
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Twitter</title>
<link rel="stylesheet" type="text/css" href="./css/tailwind.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
@larryx64
larryx64 / Sublime.php
Created June 25, 2017 17:27
Helper class to launch Sublime
<?php
class Sublime
{
/**
* Sublime shell command
*/
const COMMAND = 'subl';
@hikari-no-yume
hikari-no-yume / example.php
Created March 20, 2017 20:02
function chaining for PHP 7
<?php declare(strict_types=1);
require_once "✨.🐘";
✨($_)->strlen("foo")->var_dump($_);
@CodeMyUI
CodeMyUI / dominant-color-lazy-loading.markdown
Created February 8, 2017 04:46
Dominant Color Lazy Loading
@dillinghamio
dillinghamio / Laravel Spark Per Team User Subscription.md
Last active April 22, 2022 14:57
Per Team User Subscription in Laravel Spark

Per Team User Subscription in Laravel Spark

If you want the ability to charge a team owner based on how many members their team has, like $10/user/month, then you utilize the Laravel Cashier functionality of incrementing the quantity.

You listen for when a new team member is added and you increase the quantity of the subscription by the amount of users and also listen for when a team member is removed to downsize charges. - Not Braintree Compatible


Within EventServiceProvider.php
'Laravel\Spark\Events\Teams\TeamMemberAdded' => [
@BuffaloWill
BuffaloWill / cloud_metadata.txt
Last active June 25, 2024 11:51
Cloud Metadata Dictionary useful for SSRF Testing
## IPv6 Tests
http://[::ffff:169.254.169.254]
http://[0:0:0:0:0:ffff:169.254.169.254]
## AWS
# Amazon Web Services (No Header Required)
# from http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html#instancedata-data-categories
http://169.254.169.254/latest/meta-data/iam/security-credentials/dummy
http://169.254.169.254/latest/user-data
http://169.254.169.254/latest/user-data/iam/security-credentials/[ROLE NAME]