Skip to content

Instantly share code, notes, and snippets.

View swashata's full-sized avatar
🏡
Working from home

Swashata Ghosh swashata

🏡
Working from home
View GitHub Profile
@martarf
martarf / wp-unit-test.md
Last active June 15, 2017 11:44
Wordpress Plugin Unit Tests

WP PLUGIN UNIT TEST

You will need svn, PHPUnit and wp-cli (they are provided by VVV). Make sure you have them installed.

###1. Set up

Initialize your testing environment using install-wp-tests.sh script.This script installs a copy of Wordpress in the /tmp directory (by default) as well as the Wordpress unit testing tools. Then it creates the specified database to be used while running tests.

@yesvods
yesvods / gist:51af798dd1e7058625f4
Created August 15, 2015 11:13
Merge Arrays in one with ES6 Array spread
const arr1 = [1,2,3]
const arr2 = [4,5,6]
const arr3 = [...arr1, ...arr2] //arr3 ==> [1,2,3,4,5,6]
@robballou
robballou / someModule.js
Created October 29, 2014 23:04
Testing jQuery code in Mocha
// The hacky bit of this approach is that this module uses
// jQuery, but it is not referenced here. This is because I
// am populating it in the test via global namespace.
//
// In the browser this still works because I am adding jQuery
// via a Browserify transform (browserify-global-shim).
function someModule() {
}
modules.export = someModule;
@idleberg
idleberg / fish_shell.md
Last active February 25, 2025 01:21
Instructions on how to install Fish shell on Mac OS X, including Oh My Fish!. Also includes several useful functions.

Installation

  1. Install fish via Brew
  2. Optionally install Oh My Fish!
  3. Add fish to known shells
  4. Set default shell to fish
brew install fish  
curl -L https://get.oh-my.fish | fish
@kasparsd
kasparsd / wordpress-plugin-svn-to-git.md
Last active November 25, 2024 14:56
Using Git with Subversion Mirroring for WordPress Plugin Development
@rviscomi
rviscomi / lorem-ipsum.js
Created December 15, 2011 03:06
JavaScript Lorem Ipsum Generator
/**
* @fileOverview Generates "Lorem ipsum" style text.
* @author [email protected] Rick Viscomi,
* [email protected] Mathew Tinsley
* @version 1.0
*/
/**
* Copyright (c) 2009, Mathew Tinsley ([email protected])
* All rights reserved.