Skip to content

Instantly share code, notes, and snippets.

View gist:7366298
diff --git a/lib/ansible/runner/ b/lib/ansible/runner/
index 1755879..d305a38 100644
--- a/lib/ansible/runner/
+++ b/lib/ansible/runner/
@@ -411,6 +411,7 @@ class Runner(object):
inject = utils.combine_vars(inject, self.module_vars)
inject = utils.combine_vars(inject, self.setup_cache[host])
inject.setdefault('ansible_ssh_user', self.remote_user)
+ inject.setdefault('ansible_connection', host_connection)
inject['hostvars'] = HostVars(self.setup_cache, self.inventory)
RnbWd / build.js
Last active September 7, 2016 16:28
View build.js
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
var config = require('../config.json');
var bundler = require('./bundler');
process.env.APP_ID = config.Client.AppId;
process.env.JS_KEY = config.Client.jsKey;
gulp.task('scripts', function() {
gulp.src('./src/js/init.js', {read: false})
# Add Vagrant's NFS setup commands to sudoers, for `vagrant up` without a password
# Updated to work with Vagrant 1.3.x
# Stage updated sudoers in a temporary file for syntax checking
TMP=$(mktemp -t vagrant_sudoers)
cat /etc/sudoers > $TMP
cat >> $TMP <<EOF
# Allow passwordless startup of Vagrant when using NFS.
joemaller /
Last active February 10, 2019 23:21
A simple gulpfile example

Build-tools and Live Reload

As creating for the web has gotten more complex, build tools have become an essential part of my workflow. These tools are usually used to automate repetitive tasks such as pre-processing CSS stylesheets from Sass or Less, or compiling JavaScript from many smaller files. They can also reload browsers when files change -- not having to constantly mash reload is a significant productivity boost. Working without auto-refresh now feels like trying to type in mittens.

[Gulp][] and [Grunt][] run from the Terminal, [CodeKit][] and [LiveReload][] are standalone Mac apps. Gulp is relatively new, is very fast and its task definition files are written in JavaScript. Grunt is more established, works well and has a ton of people using it, but can be slower and requires a lot more configuration using verbose JSON files. CodeKit and LiveReload help with common workflows, Gulp and Grunt can do just about anything imaginable.

I’d been happily using Grunt for a while, but increasing buzz a

joemaller / wordpress-rewrite-rule-dump.php
Created September 12, 2019 19:06
A default dump of WordPress rewrite rules from a fresh install of WordPress v5.2.3
View wordpress-rewrite-rule-dump.php
array (
'^wp-json/?$' => 'index.php?rest_route=/',
'^wp-json/(.*)?' => 'index.php?rest_route=/$matches[1]',
'^index.php/wp-json/?$' => 'index.php?rest_route=/',
'^index.php/wp-json/(.*)?' => 'index.php?rest_route=/$matches[1]',
'robots\\.txt$' => 'index.php?robots=1',
'.*wp-(atom|rdf|rss|rss2|feed|commentsrss2)\\.php$' => 'index.php?feed=old',
'.*wp-app\\.php(/.*)?$' => 'index.php?error=403',
'.*wp-register.php$' => 'index.php?register=true',
msurguy /
Last active February 8, 2022 03:13
Laravel 4 Eloquent Cheat Sheet.


Defining Eloquent model (will assume that DB table named is set as plural of class name and primary key named "id"):

class Shop extends Eloquent {}

Using custom table name

protected $table = 'my_shops';

jonraasch /
Created April 21, 2010 14:32
Extends the object to CSS3 transition
// to verify that CSS3 transition is supported (or any of its browser-specific implementations)
$.support.transition = (function(){
var thisBody = document.body || document.documentElement,
thisStyle =,
support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined;
return support;
hollodotme /
Last active August 11, 2022 06:23
Installing php7-fpm with phpredis and xdebug extension on Ubuntu 14.04

Install php7.0-fpm

# remove php5 modules
apt-get autoremove --purge php5-*
# add php-7.0 source list by [Ondřej Surý](
add-apt-repository ppa:ondrej/php
# Update index
apt-get update
# Install php7.0-fpm with needed extensions
paulund / example-wp-list-table.php
Last active May 23, 2023 07:58
An example code of using the WP_List_Table class. With Pagination.
View example-wp-list-table.php
* Plugin Name: Paulund WP List Table Example
* Description: An example of how to use the WP_List_Table class to display data in your WordPress Admin area
* Plugin URI:
* Author: Paul Underwood
* Author URI:
* Version: 1.0
* License: GPL2
marktheunissen / pedantically_commented_playbook.yml
Last active June 28, 2023 19:50 — 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.