Skip to content

Instantly share code, notes, and snippets.

View marklj's full-sized avatar

Mark Johnson marklj

View GitHub Profile
@marklj
marklj / domain.test.conf
Created September 24, 2024 20:01
Laravel Herd Nginx API UI Proxy Configuration
server {
listen 127.0.0.1:80;
server_name domain.test;
root /;
location ^~ /api {
rewrite ^ "/Applications/Herd.app/Contents/Resources/valet/server.php" last;
}
location / {
@marklj
marklj / tailwind-uswds-opinionated.js
Created December 7, 2018 18:03
A TailwindCSS config file for the U.S. Web Design System. The configuration morphs the USWDS styling into tailwind conventions. Check out https://gist.github.com/marklj/fba4b070cbb4a4810c340b69419113b2 to see a more accurate and complete USWDS configuration.
/*
Tailwind - The Utility-First CSS Framework
A project by Adam Wathan (@adamwathan), Jonathan Reinink (@reinink),
David Hemphill (@davidhemphill) and Steve Schoger (@steveschoger).
Welcome to the Tailwind config file. This is where you can customize
Tailwind specifically for your project. Don't be intimidated by the
length of this file. It's really just a big JavaScript object and
@marklj
marklj / tailwind-uswds.js
Created December 7, 2018 17:23
TailwindCSS configuration file to closely match the U.S. Web Design System (https://v2.designsystem.digital.gov)
/*
Tailwind - The Utility-First CSS Framework
A project by Adam Wathan (@adamwathan), Jonathan Reinink (@reinink),
David Hemphill (@davidhemphill) and Steve Schoger (@steveschoger).
Welcome to the Tailwind config file. This is where you can customize
Tailwind specifically for your project. Don't be intimidated by the
length of this file. It's really just a big JavaScript object and
@marklj
marklj / web.config
Created May 23, 2018 20:41
IIS laravel web.config
<configuration>
<system.webServer>
<defaultDocument>
<files>
<clear />
<add value="index.php" />
<add value="default.aspx" />
<add value="Default.htm" />
<add value="Default.asp" />
<add value="index.htm" />
@marklj
marklj / cloudSettings
Last active August 22, 2018 03:22
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-04-07T00:50:03.295Z","extensionVersion":"v2.9.0"}
// Inspired by: https://pawelgrzybek.com/from-sass-to-postcss/
// Using Laravel Elixir 5
var elixir = require('laravel-elixir');
var autoprefixer = require('autoprefixer');
require('laravel-elixir-postcss');
elixir(function(mix) {
class Phone {
private let number: PhoneNumber
var carrier: String
init(number: PhoneNumber, carrier: String) {
self.number = number
self.carrier = carrier
}
#!/bin/bash
if [[ $1 ]]; then
openssl rand -base64 $1
else
openssl rand -base64 32
fi
# make an alias
# alias crypto='/usr/local/bin/openssl_key_gen.sh'
@marklj
marklj / laravel_uuid.php
Last active July 29, 2016 15:59
UUIDs in Laravel
<?php
// Migration
$table->binary('uuid', 16);
// ID interface
interface Identifier
{
/**
* Generate a new Identifier