Skip to content

Instantly share code, notes, and snippets.

View sebastiandedeyne's full-sized avatar

Sebastian De Deyne sebastiandedeyne

View GitHub Profile
@sebastiandedeyne
sebastiandedeyne / dropbox-sublime
Last active September 20, 2015 14:27
Symlinking Sublime Text's package folders with Dropbox
# Unix
cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages && rm -rf User && ln -s ~/Dropbox/Settings/Sublime ./User
# Windows
mklink /j "C:\Users\Sebastian\AppData\Roaming\Sublime Text 3\Packages\User" "C:\Users\Sebastian\Dropbox\Settings\Sublime"
@sebastiandedeyne
sebastiandedeyne / .htaccess
Created October 23, 2014 15:25
Htaccess www to non-www
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
@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'));
})
<?php
class Foo
{
use MemoizesFunctions;
public function getFoo()
{
return $this->memoize(function () {
return 'foo';
@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')
],
#!/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 \
#!/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...
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 () =>
<template>
<table-component
:data="members"
sort-by="lastName"
sort-order="asc"
>
<template slot-scope="{ state, rows }">
<div>
<input v-model="state.filterQuery">
<table>
(
<th className={classnames(
'datatable__cell whitespace-no-wrap',
className,
{
'text-primary': sorted,
'cursor-pointer': sortable,
}
)}>
...