Skip to content

Instantly share code, notes, and snippets.

View rawaludin's full-sized avatar
:octocat:
Fix stuff

Rahmat Awaludin rawaludin

:octocat:
Fix stuff
View GitHub Profile

git rev-parse --show-toplevel = get root directory for git folder

@rawaludin
rawaludin / tugas-nf.md
Last active February 17, 2018 09:12
Tugas Nurul Fikri.md

Tugas:

  • CRUD
  • Authentication
  • Policy
  • Validation
  • Relationship di Model
  • API dengan auth
  • Sample data
  • dll
{
"meta": {
"count": 10,
"total": 534,
"tz": "UTC"
},
"data": [
{
"type": "lists",
"id": "008221860b",
"
function! GenerateAssertion(domain, table, const, attribute, foreign)
let l:base='GreenBuildingVerification'
let l:table='prop_green_building_verifications'
let l:attribute='green_building_verification'
let l:const='GREEN_BUILDING_VERIFICATION_TYPE'
let l:foreign='green_building_verification_id'
" pivot assertion
execute '!cp -rf ./tests/Controllers/Concerns/PivotAssertion/'.l:base.'.php tests/Controllers/Concerns/PivotAssertion/'.a:domain.'.php'
function! LinterStatus() abort
let l:counts = ale#statusline#Count(bufnr(''))
let l:all_errors = l:counts.error + l:counts.style_error
let l:all_non_errors = l:counts.total - l:all_errors
return l:counts.total == 0 ? '' : printf(
\ ' [%dW %dE]',
\ all_non_errors,
\ all_errors
@extends('layouts.app')
@section('content')
<div class="container">
<a href="{{ route('posts.create') }}" class="btn btn-default">Tulisan baru</a>
<table class="table table-striped">
<thead>
<tr>
<th>#</th>
<th>Judul</th>
function! GenerateDomain(domain, table, relationship, config, const, payload_field, foreign)
" contracts
execute '!cp -rf ./app/Contracts/Basement app/Contracts/'.a:domain
execute "!find ./app/Contracts/".a:domain." -type f | xargs sed -i '' -e 's/Basement/".a:domain."/g'"
execute "!find ./app/Contracts/".a:domain." -type f | sed 'p;s/Basement/".a:domain."/g' | xargs -n2 mv"
" domain
execute '!cp -rf app/Domains/Basement app/Domains/'.a:domain
execute "!find ./app/Domains/".a:domain." -type f | sed 'p;s/Basement/".a:domain."/g' | xargs -n2 mv"
execute "!find ./app/Domains/".a:domain." -type f | xargs sed -i '' -e 's/Basement/".a:domain."/g'"
function! ApiaryToPhp()
set ignorecase
set textwidth=80
" turn to $table->tipe..('field');(tipe..)...
execute "normal! dt`r'f`r'"
execute "normal! ldt(lyi("
execute "normal! 0i$table->\<ESC>pa(\<ESC>f';a);\<ESC>"
" save description as comment if type is lookup
" for easier setup relationship manually
let notLookup = ["string", "boolean", "number"]
{
"meta": {
"errors": [
"Row #2: validation.unique",
"Row #4: validation.unique",
"Row #5: validation.unique",
"Row #6: validation.required",
"Row #7: validation.required",
"Row #8: validation.required",
"Row #9: validation.required",