Skip to content

Instantly share code, notes, and snippets.

View Malezha's full-sized avatar

Oleh Isaiev Malezha

  • ZFORT Group
  • Ukraine
View GitHub Profile
@FZambia
FZambia / index.html
Last active June 5, 2019 08:48
Centrifuge library Habr example
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!-- Обратите внимание, что клиент тут импортируется из ветки c2 репозитория centrifuge-js -->
<script type="text/javascript" src="https://rawgit.com/centrifugal/centrifuge-js/c2/dist/centrifuge.min.js"></script>
</head>
<body>
<input type="text" id="input" />
<script type="text/javascript">

ES5 Example

Vue 2.0-rc (native template)

new Vue({
    el: '#app',
    data: {
        variable1: 23,
        variable2: 42
@cmaas
cmaas / CastsValueObject.php
Last active March 21, 2020 12:56
A Trait to automatically cast value objects in Laravel without needing a Mutator and an Accessor.
<?php
trait CastsValueObjects
{
protected function castAttribute($key, $value)
{
$castToClass = $this->getValueObjectCastType($key);
// no Value Object? simply pass this up to the parent
if (!$castToClass) {
return parent::castAttribute($key, $value);
{
"dependencies": {
// Babel (ES6, ES7, Flow, etc...)
"babel-core": "5.8.*",
"gulp-babel": "5.2.*",
// CoffeeScript
"gulp-coffee": "^2.3.1",
// Sass and Scss