Skip to content

Instantly share code, notes, and snippets.

@valex
valex / ViewsController.php
Created December 21, 2018 13:31
Laravel Controller
<?php
namespace App\Http\Controllers;
use App\Events\CommentAdded;
use App\Helpers\DatetimeHelper;
use App\Helpers\YoutubeHelper;
use App\Http\Requests\AddComment;
use App\Http\Requests\StoreTrainViewRequest;
use App\Http\Requests\StoreWaypointsRequest;
@valex
valex / component.vue
Created December 15, 2018 21:42
Vue example component
<template>
<div>
<div class="calculator">
<table class="matrixAWrapper">
<tr>
<td>
<div class="rowsResizer">
<div @click="subRowM1" class="resizeBtn">-</div>
<div @click="addRowM1" class="resizeBtn">+</div>
</div>
@valex
valex / index.html
Created October 23, 2018 16:48
select
<!DOCTYPE html>
<html>
<head>
<title>defaultValue</title>
<meta charset="utf-8">
</head>
<body>
<div id="app">
<!-- my app renders here -->
</div>
@valex
valex / index.html
Created October 23, 2018 16:40
textarea
<!DOCTYPE html>
<html>
<head>
<title>textarea</title>
<meta charset="utf-8">
</head>
<body>
<div id="app1"></div>
<div id="app2"></div>
<div id="app3"></div>
@valex
valex / index.html
Created October 23, 2018 16:36
defaultValue
<!DOCTYPE html>
<html>
<head>
<title>defaultValue</title>
<meta charset="utf-8">
</head>
<body>
<div id="app">
<!-- my app renders here -->
</div>
@valex
valex / index.html
Created October 23, 2018 11:37
Component children elements
<!DOCTYPE html>
<html>
<head>
<title>JSX multiple nodes</title>
<meta charset="utf-8">
</head>
<body>
<div id="app">
<!-- my app renders here -->
</div>
@valex
valex / index.html
Created October 23, 2018 11:34
Only one root element
<!DOCTYPE html>
<html>
<head>
<title>JSX multiple nodes</title>
<meta charset="utf-8">
</head>
<body>
<div id="app">
<!-- my app renders here -->
</div>
@valex
valex / index.html
Created October 23, 2018 11:27
Attrs spread
<!DOCTYPE html>
<html>
<head>
<title>JSX spread</title>
<meta charset="utf-8">
</head>
<body>
<div id="app">
<!-- my app renders here -->
</div>
@valex
valex / index.html
Created October 22, 2018 16:15
Table export to JSON and CSV
<!DOCTYPE html>
<html>
<head>
<title>Table</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="03.00.table.css">
</head>
<body>
<div id="app">
<!-- my app renders here -->
@valex
valex / index.html
Created October 22, 2018 14:54
Log component state with reply
<!DOCTYPE html>
<html>
<head>
<title>Table</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="03.00.table.css">
</head>
<body>
<div id="app">
<!-- my app renders here -->