Skip to content

Instantly share code, notes, and snippets.

View sebastiandedeyne's full-sized avatar

Sebastian De Deyne sebastiandedeyne

View GitHub Profile
document.addEventListener('alpine:init', () => {
Alpine.store('breakpoint', {
listeners: {},
init() {
const breakpoints = {
sm: 640,
md: 768,
lg: 1024,
xl: 1280,
import React from 'react';
type Props = {
data: Array<[number, string]>;
};
export default function LineChart({ data }: Props) {
if (!data.length) {
return null;
}
(
<th className={classnames(
'datatable__cell whitespace-no-wrap',
className,
{
'text-primary': sorted,
'cursor-pointer': sortable,
}
)}>
...
<template>
<table-component
:data="members"
sort-by="lastName"
sort-order="asc"
>
<template slot-scope="{ state, rows }">
<div>
<input v-model="state.filterQuery">
<table>
const marked = require("marked");
const loaderUtils = require("loader-utils");
module.exports = function(source) {
const { template } = loaderUtils.getOptions(this);
return `
import Template from '${template}'
export default () =>
#!/usr/bin/env bash
function pw {
# Register the command you want to run when changes are detected here
run="clear && printf '\e[3J' && vendor/bin/phpunit"
# Retrieve the custom argments. If none are provided, default to "tests"
[[ -n $@ ]] && args=$@ || args="tests"
# Run the command first...
#!/usr/bin/env bash
function pw {
run="clear && printf '\e[3J' && vendor/bin/phpunit"
[[ -n $@ ]] && args=$@ || args="tests"
eval "$run $args"
watchman-make \
-p 'src/**/*.php' 'tests/**/*.php' \
--make=$run \
@sebastiandedeyne
sebastiandedeyne / app.js
Created October 25, 2016 08:27
Helper to inject ancestor options in a Vue component
import inject from './inject';
import Vue from 'vue';
const Level3 = {
template: '<div>{{ greeting }}</div>',
mixins: [
inject('translations', 'user')
],
<?php
class Foo
{
use MemoizesFunctions;
public function getFoo()
{
return $this->memoize(function () {
return 'foo';
@sebastiandedeyne
sebastiandedeyne / gulpfile.js
Created August 16, 2015 14:40
Jekyll with elixir
var elixir = require('laravel-elixir');
var gulp = require('gulp');
var shell = require('gulp-shell');
elixir.extend('jekyll', function() {
gulp.src('').pipe(shell('jekyll serve --no-watch'));
new elixir.Task('jekyll', function() {
return gulp.src('').pipe(shell('jekyll build'));
})