Skip to content

Instantly share code, notes, and snippets.

Sebastian De Deyne sebastiandedeyne

Block or report user

Report or block sebastiandedeyne

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View LineChart.tsx
import React from 'react';
type Props = {
data: Array<[number, string]>;
};
export default function LineChart({ data }: Props) {
if (!data.length) {
return null;
}
View after.js
(
<th className={classnames(
'datatable__cell whitespace-no-wrap',
className,
{
'text-primary': sorted,
'cursor-pointer': sortable,
}
)}>
...
View ActualTable.vue
<template>
<table-component
:data="members"
sort-by="lastName"
sort-order="asc"
>
<template slot-scope="{ state, rows }">
<div>
<input v-model="state.filterQuery">
<table>
View markdown-loader.js
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 () =>
View phpunit-watcher-annotated.sh
#!/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...
View phpunit-watcher.sh
#!/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 Oct 25, 2016
Helper to inject ancestor options in a Vue component
View app.js
import inject from './inject';
import Vue from 'vue';
const Level3 = {
template: '<div>{{ greeting }}</div>',
mixins: [
inject('translations', 'user')
],
View Foo.php
<?php
class Foo
{
use MemoizesFunctions;
public function getFoo()
{
return $this->memoize(function () {
return 'foo';
View gulpfile.js
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'));
})
@sebastiandedeyne
sebastiandedeyne / .htaccess
Created Oct 23, 2014
Htaccess www to non-www
View .htaccess
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
You can’t perform that action at this time.