This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Vagrant.configure("2") do |config| | |
| config.vm.box = "precise32" | |
| config.vm.box_url = "http://files.vagrantup.com/precise32.box" | |
| config.vm.network :public_network | |
| config.vm.provision :shell, :path => "deploy-puppet.sh" | |
| config.vm.provision :puppet do |puppet| | |
| puppet.module_path = "modules" | |
| puppet.manifests_path = "manifests" | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function! RunNetGrep(pattern, ...) | |
| let tmpfile = tempname() | |
| if exists('g:NetGrep_server_name') && exists('g:NetGrep_default_directory') | |
| let server_name = g:NetGrep_server_name | |
| let default_directory = g:NetGrep_default_directory | |
| else | |
| echom "Error: NetGrep requires g:NetGrep_server_name and g:NetGrep_default_directory" | |
| return | |
| endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function! OpenQuickList(data) | |
| silent! botright 10split __QuickList__ | |
| normal! ggdG | |
| setlocal buftype=nofile | |
| setlocal bufhidden=delete | |
| setlocal noswapfile | |
| setlocal nowrap | |
| setlocal nobuflisted |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var loadTasks = require( 'load-grunt-tasks' ); | |
| module.exports = function(grunt) { | |
| // Project configuration. | |
| grunt.initConfig({ | |
| pkg: grunt.file.readJSON('package.json'), | |
| nodemon: { | |
| dev: { | |
| script: 'server.js', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "require-dev": { | |
| "10up/wp_mock": "dev-master" | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " Highlight ES6 template strings | |
| hi link javaScriptTemplateDelim String | |
| hi link javaScriptTemplateVar Text | |
| hi link javaScriptTemplateString String |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class SomeClass { | |
| public function do_something( $times ) { | |
| $user = wp_get_current_user(); | |
| //... | |
| return true; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| const Header = () => <div className="header"><img className="header__logo" src="/assets/logo.png" /><h1 className="header__title">My App</h1></div>; | |
| const ToDoList = () => <div className="to-do-list"><h2 className="to-do-list__title">To Do</h2></div>; | |
| const Controls = () => <div className="controls"><h2 className="controls__title">Controls</h2></div>; | |
| const Footer = () => <div className="footer">Made by Me</div>; | |
| export default React.createClass( { | |
| render() { | |
| return ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| require_once( 'get-deep-value.php' ); | |
| /** | |
| * @runTestsInSeparateProcess | |
| */ | |
| class Get_Deep_Value_Test extends PHPUnit_Framework_TestCase { | |
| use Codeception\Specify; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <? | |
| class FunctionalFuncs { | |
| public static function compose() { | |
| $function_reducer = function ( $result, $func ) { | |
| return [ call_user_func_array( $func, $result ) ]; | |
| }; | |
| $callbacks = func_get_args(); | |
| return function() use ( $callbacks, $function_reducer ) { | |
| $arguments = func_get_args(); | |
| return array_reduce( $callbacks, $function_reducer, $arguments )[0]; |