Skip to content

Instantly share code, notes, and snippets.

Avatar

Eugene LordJohn42

  • Novosibirsk
View GitHub Profile
View cloudSettings
{"lastUpload":"2020-09-22T14:35:46.425Z","extensionVersion":"v3.4.3"}
@LordJohn42
LordJohn42 / Container.php
Last active Sep 26, 2019
PHP code examples.
View Container.php
<?php
// Simple container
// Простая реализация контейнера.
namespace System\Container;
use Psr\Container\ContainerInterface;
use ReflectionClass;
use ReflectionException;
@LordJohn42
LordJohn42 / Flower.vue
Last active Sep 26, 2019
Vue component for d3 hexagonal view. (Выглядит примерно так https://www.d3-graph-gallery.com/img/graph/hexbinmap_geo_basic.png)
View Flower.vue
<template>
<div>
<div class="row">
<div class="col-sm-12">
<div class="content-header">Цветок</div>
</div>
</div>
<section id="grid-option">
<div class="row">
@LordJohn42
LordJohn42 / Directory structure
Created Sep 26, 2019
Angular code examples. Code show factory for uploading 3d models. Work with Observable & Protobuf.
View Directory structure
├── components
│   ├── model-list
│   │   ├── model-list.component.html
│   │   ├── model-list.component.scss
│   │   ├── model-list.component.spec.ts
│   │   └── model-list.component.ts
│   ├── models3d-layout
│   │   ├── models3d-layout.component.spec.ts
│   │   └── models3d-layout.component.ts
│   └── upload-model
@LordJohn42
LordJohn42 / example.html
Created Jun 9, 2016
Checkbox group AngularJS.
View example.html
<input checkbox-group="true" type="checkbox" id="checkbox-toogle-all">
<div id="checkBoxContainer" ng-repeat="selectedItem in list">
<input type="checkbox" checkbox-group/>
<label class="">{{selectedItem.value}}</label>
</div>
View Debug form snipper
[].forEach.call(document.querySelectorAll('form'), function (input) {
var table = [];
console.group('HTMLForm "' + input.name + '": ' + input.action);
console.log('Element: ', input, '\nName: ' +
input.name + '\nMethod: ' + input.method.toUpperCase() +
'\nAction: ' + input.action || 'null');
['input', 'textarea', 'select'].forEach(function (control) {
[].forEach.call(input.querySelectorAll(control), function (node) {