git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
<%* | |
fastStart = async (filename, delayInSecond) => { | |
if (tp.file.exists(filename)) { | |
const f = tp.file.find_tfile(filename); | |
let plugins = (await app.vault.read(f)).split(/\r?\n/); | |
setTimeout(async () => { | |
plugins.forEach(async (p) => await app.plugins.enablePlugin(p)) | |
}, delayInSecond * 1000) | |
} | |
} |
<?xml version="1.0"?> | |
<ruleset name="Laravel Standards"> | |
<!-- | |
The name attribute of the ruleset tag is displayed | |
when running PHP_CodeSniffer with the -v command line | |
argument. The description tag below is not displayed anywhere | |
except in this file, so it can contain information for | |
developers who may change this file in the future. | |
--> |
/* | |
Exemples : | |
<a href="posts/2" data-method="delete" data-token="{{csrf_token()}}"> | |
- Or, request confirmation in the process - | |
<a href="posts/2" data-method="delete" data-token="{{csrf_token()}}" data-confirm="Are you sure?"> | |
*/ | |
(function() { | |
#!/bin/bash | |
# install homebrew's official php tap | |
brew tap josegonzalez/homebrew-php | |
# install homebrew-dupes (required to install zlib, php54's dependency) | |
brew tap homebrew/dupes | |
# install nginx + mysql + php 5.4 + php-fpm + apc + xdebug | |
brew install nginx mysql |
version: 2 | |
jobs: | |
build: | |
working_directory: ~/user/repo | |
environment: | |
BASH_ENV: ~/.bashrc | |
docker: |
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
.
Note: Implicit Route Model Binding in 5.2, auth session doesn't exist at the point of this trait causing issue. fixed in 5.3
Makes it simple to use Spark's role feature on routes
Route::group(['middleware'=>'role:owner'], function(){
// owners only
});
Route::group(['middleware'=>'role:member'], function(){
[ | |
{ | |
"class": "sidebar_container", | |
// $base02: #073642 | |
"layer0.tint": [7,54,66], | |
"layer0.opacity": 1.0, | |
"layer0.draw_center": false, | |
"layer0.inner_margin": [0, 0, 1, 0], | |
"content_margin": [0, 0, 1, 0] |