Skip to content

Instantly share code, notes, and snippets.

@owenconti
owenconti / gist:70fe5fe06b4fb84d7732
Created February 13, 2016 02:22
laravel repository class
<?php
namespace App\Repositories;
use Illuminate\Container\Container as App;
use Illuminate\Database\Eloquent\Model;
/**
* Class Repository
* @package App\Repositories
@owenconti
owenconti / gist:16fc0fc59fdcb4b89761
Created February 13, 2016 02:25
laravel new table
Schema::create('table_name', function(Blueprint $table) {
$table->increments('id');
$table->timestamps();
});
@owenconti
owenconti / dock-spaces
Created March 24, 2016 02:46
Add spaces to dock on OSX
defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="spacer-tile";}'
killall Dock
@owenconti
owenconti / styles.less
Created March 25, 2016 22:04
CSS Guidelines
/**
* Class names should be all lowercase.
* Class names should be separated by hyphens.
* IDs should not be used unless weird scenario requires them.
* Idents should never be more than 1 level deep (does not apply to pseudo selectors)
* Hex color codes should use uppercase characters.
*/
.component-name {
.sub-element {
<% include ../header %>
<div id="app">
<div class="level">
<div class="level-left">
<label class="level-item">
<input
type="checkbox"
v-model="showCompleted"
/>
function a() {
var hello = "world";
function b() {
alert(hello);
}
b();
}
info:
title: Example data
version: 1.0.0
swagger: '2.0'
paths:
'/data':
get:
summary: List data
description: List data
produces:
swagger: '2.0'
info:
title: TestApp
version: 1.0.0
host: example.com
schemes:
- https
paths:
/test:
post:
swagger: "2.0"
info:
version: "1.0.0"
title: "someName"
host: "localhost:8080"
basePath: "/rest"
tags:
- name: "someTag"
schemes:
- "http"
swagger: '2.0'
info:
title: Test API
version: '1'
schemes:
- http
basePath: /configuration
tags:
- name: configuration
paths: