Skip to content

Instantly share code, notes, and snippets.

Avatar

David Knight davidnknight

View GitHub Profile
@loilo
loilo / pass-slots.md
Last active Aug 4, 2020
Vue: Pass Slots through from Parent to Child Components
View pass-slots.md

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 = {
@hacksalot
hacksalot / install-wkhtmltopdf-travis.md
Last active Jul 1, 2019
Install wkhtmltopdf on Ubuntu 16.04 LTS
View install-wkhtmltopdf-travis.md

Install the [latest wkhtmltopdf binary][1], extract it, and copy the wkhtmltopdf and wkhtmltoimage executables to /usr/bin/.

wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
tar xf  wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
cd ./wkhtmltox/bin/
sudo cp -R ./* /usr/bin/
wkhtmltopdf -V
@BradEstey
BradEstey / gulpfile.js
Last active May 24, 2016
Gulp Task to run PHPUnit from a Vagrant VM
View gulpfile.js
var gulp = require('gulp'),
sys = require('sys'),
ssh2 = require('ssh2');
gulp.task('phpunit', function() {
var ssh = new ssh2();
ssh.on('ready', function () {
ssh.exec('cd /vagrant; phpunit', {}, function (err, stream) {
@JeffreyWay
JeffreyWay / PhotoApiTest.php
Created May 21, 2013
Testing APIs in Laravel. Thoughts?
View PhotoApiTest.php
<?php
class PhotoApiTest extends TestCase {
public function setUp()
{
parent::setUp();
Route::enableFilters();
@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active Aug 7, 2020 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
View pedantically_commented_playbook.yml
This playbook has been removed as it is now very outdated.
@mathiasbynens
mathiasbynens / appify
Created Nov 12, 2010 — forked from subtleGradient/appify
appify — create the simplest possible Mac app from a shell script
View appify
#!/bin/bash
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF
appify v3.0.1 for Mac OS X - http://mths.be/appify
Creates the simplest possible Mac app from a shell script.
Appify takes a shell script as its first argument:
`basename "$0"` my-script.sh
You can’t perform that action at this time.