Skip to content

Instantly share code, notes, and snippets.

@wdmtech
wdmtech / VueComponent.vue
Created October 7, 2016 17:46
Vue 2.0 component scaffold
<template>
<span>
</span>
</template>
<script>
export default {
methods: {},
mounted: {},
@wdmtech
wdmtech / twitter.js
Created July 21, 2016 15:43 — forked from cjoudrey/twitter.js
Lazy-rendering in PhantomJS
// This example shows how to render pages that perform AJAX calls
// upon page load.
//
// Instead of waiting a fixed amount of time before doing the render,
// we are keeping track of every resource that is loaded.
//
// Once all resources are loaded, we wait a small amount of time
// (resourceWait) in case these resources load other resources.
//
// The page is rendered after a maximum amount of time (maxRenderTime)
@wdmtech
wdmtech / find_port_usage_linux.md
Created June 10, 2016 09:23
Find port usage on Linux

netstat -an | grep 80

@wdmtech
wdmtech / gist:17b920bb8e56729b24b9325371d1fa72
Created April 29, 2016 08:19 — forked from rikh42/gist:efad95142b1be3429a94
Laravel Homestead XDebug Nginx and Composer config changes

Laravel Homestead XDebug Nginx and Composer config changes

/etc/nginx/fastcgi_params

Update nginx config to support a longer timeout to prevent it dropping the connection when trying to debug in PHP Storm

fastcgi_read_timeout 600; # Set fairly high for debugging
Full thanks to Lewis on laracasts for this!
https://laracasts.com/forum/?p=1648-phpstorm-homestead-xdebug/0
---
PHPStorm debugging is amazing
I recently installed Homestead for my development environment and discovered Xdebug needed some additional settings before it would work. Here's a step-by-step process that I used to get PHPStorm + Homestead + Xdebug working in harmony.
I'm going to assume you have installed PHPStorm and Homestead.
@wdmtech
wdmtech / introrx.md
Created February 25, 2016 15:04 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
<template lang="jade">
component(
:is="stepHandler.currentStep"
transition="switch-step"
transition-mode="out-in"
:step-handler="stepHandler"
)
</template>
<style lang="stylus">

9 workspaces :)

gsettings set org.compiz.core:/org/compiz/profiles/unity/plugins/core/ vsize 3
gsettings set org.compiz.core:/org/compiz/profiles/unity/plugins/core/ hsize 3
@wdmtech
wdmtech / gulpfile.js
Created February 15, 2016 21:46
gulpfile.js
var gulp = require('gulp');
var gutils = require('gulp-util');
var elixir = require('laravel-elixir');
require('laravel-elixir-imagemin');
require('laravel-elixir-browsersync');
require('laravel-elixir-modernizr');
var b = elixir.config.js.browserify;
var cssnext = require("gulp-cssnext");