Skip to content

Instantly share code, notes, and snippets.

View jmsfwk's full-sized avatar

James Fenwick jmsfwk

View GitHub Profile
@loilo
loilo / pass-slots.md
Last active October 16, 2024 18:16
Vue: Pass Slots through from Parent to Child Components

Vue: Pass Slots through from Parent to Child Components

The Situation

  • We've got some components A, B and C which provide different slots.
    const A = {
      template: `<div><slot name="a">Default A Content</slot></div>`
    }

const B = {

@jgosmann
jgosmann / pre-push
Created June 16, 2016 15:17
Prevent pushing fixup, squash, and WIP commits to master.
#!/bin/sh
# An example hook script to verify what is about to be pushed to master. Called
# by "git push" after it has checked the remote status, but before anything has
# been pushed. If this script exits with a non-zero status nothing will be
# pushed.
#
# This hook is called with the following parameters:
#
# $1 -- Name of the remote to which the push is being done
@kamermans
kamermans / rc.php
Created August 29, 2014 18:40
A better psysh/rc.php that automatically loads your composer autoloader
<?php
/**
* This is a better Psysh rc.php
*/
$add_composer_autoloader = function(array $config) {
static $was_run = false;
if ($was_run) {
return $config;
@gf3
gf3 / html5.vim
Created May 5, 2010 15:27 — forked from rcmachado/html5.vim
vim HTML5 Syntax File
" Vim syntax file
" Language: HTML (version 5)
" Maintainer: Rodrigo Machado <[email protected]>
" URL: http://rm.blog.br/vim/syntax/html.vim
" Last Change: 2009 Aug 19
" License: Public domain
" (but let me know if you liked it :) )
"
" Note: This file just adds the new tags from HTML 5
" and don't replace default html.vim syntax file