A Pen by Tristan Bailey on CodePen.
<?php | |
// Return our response as quickly as possible. | |
header('Connection: close'); | |
ob_start(); | |
header('HTTP/1.0 200 OK'); | |
ob_end_flush(); | |
flush(); |
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: supervisord | |
# Required-Start: $remote_fs | |
# Required-Stop: $remote_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Example initscript | |
# Description: This file should be used to construct scripts to be | |
# placed in /etc/init.d. |
##Team Dropdown for Laravel Spark
Maybe you want a way for users to quickly jump to team settings?
Can be placed anywhere, try it out on user-right.blade.php
user()->currentTeam; ?>
##Rotating Pricing Table for Laravel Spark
Can be placed anywhere, try it out on welcome.blade.php
###If you're using team plans
just swap out
$sparkPlans = Spark::plans();
with $sparkPlans = Spark::teamPlans();
<html> | |
<head> | |
</head> | |
<body> | |
<div class="overlay"> | |
<a href="#" class="overlay__title">Little teaser about the content</a> | |
<div class="overlay__content"> | |
<div class="overlay__inner"> | |
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p> | |
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and s |
UsedByTeams Model Trait For Laravel Spark
Automatically limit your models to the current team
So you're using spark, and you have teams enabled. You start creating models and want to have them be team specific. Instead of writing, Model::where('team_id', auth()->user()->currentTeam->id)->get();
use this trait to add that behind the scenes so that every time you call on your model, it's assumed that you mean for the current team.
This assumes that the model has a team_id
, while it adds a scope of where team_id = currentTeam->id
.
This is a ServiceWorker template to turn small github pages into offline ready app.
Whenever I make small tools & toys, I create github repo and make a demo page using github pages (like this one).
Often these "apps" are just an index.html
file with all the nessesary CSS and JavaScript in it. I wanted to cache this html file so that I can access my tools offline as well.
Make sure your github pages have HTTPS enforced, you can check Settings > GitHub Pages > Enforce HTTPS
of your repository.
moved to github --> https://github.com/bill-auger/git-branch-status/ |
# NOT FOR SHELL SCRIPT, but rather just for quick copy paste | |
# this is a copy-paste version with defaults of full shell script docker-xenial.sh | |
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D && \ | |
mkdir -p /etc/apt/sources.list.d && \ | |
echo deb https://apt.dockerproject.org/repo ubuntu-xenial main > /etc/apt/sources.list.d/docker.list && \ | |
service lxcfs stop && apt-get remove -y -q lxc-common lxcfs lxd lxd-client && \ | |
apt-get update -q && apt-get upgrade -y -q && \ | |
apt-get install -y -q linux-image-extra-$(uname -r) linux-image-extra-virtual && \ | |
apt-get install -y -q docker-engine && \ |