A Pen by Chris Coyier on CodePen.
This file contains 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
/** | |
* Originally from http://davidwalsh.name/convert-xml-json | |
* This is a version that provides a JSON object without the attributes and places textNodes as values | |
* rather than an object with the textNode in it. | |
* 27/11/2012 | |
* Ben Chidgey | |
* | |
* @param xml | |
* @return {*} | |
*/ |
This file contains 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-файла в проекте | |
var phpunit = require('gulp-phpunit'); | |
var gulp = require('gulp'), | |
notify = require('gulp-notify'), | |
phpunit = require('gulp-phpunit'); | |
gulp.task('phpunit', function() { | |
var options = {debug: false, notify: true}; |
This file contains 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
/* | |
Simple jQuery Curved Line Plugin for use with Google Maps Api | |
author: Daniel Nanovski | |
modifications: Coen de Jong | |
version: 0.0.2 (Beta) | |
website: http://curved_lines.overfx.net/ | |
License: |
This file contains 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
'use strict'; | |
/* | |
Instructions: | |
1 - Should execute 'npm run prepare' | |
before the very first run, it will install and symlink all dependencies. | |
2 - Choose between production 'npm start' and development 'npm run start-dev' modes | |
(watcher will run immediately after initial run). |
This file contains 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 gulp = require('gulp'), | |
cache = require('gulp-cache'), | |
clean = require('gulp-clean'), | |
stream = require('event-stream'), | |
size = require('gulp-size'), | |
jshint = require('gulp-jshint'), | |
concat = require('gulp-concat'), | |
uglify = require('gulp-uglify'), | |
minifyCSS = require('gulp-minify-css'), |
This file contains 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 | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.com | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query | |
* Source: http://core.trac.wordpress.org/browser/tags/3.5.1/wp-includes/query.php | |
*/ | |
$args = array( |
This file contains 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 text = "one, two"; | |
var text1 = text.split(","); | |
Array.prototype.slice.call(text1).map(function(item) { | |
return item.replace(" ", ""); | |
}); |
This file contains 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 jsonObj = [{"forget":"me","leave":"alone"}, {"take":"them", "not":"him"}]; | |
var arr = []; | |
for(var i = 0; i < jsonObj.length; i++) { | |
var val = jsonObj[i]; | |
var def = Object.keys(val); | |
//console.log("all keys: " + def); | |
for(var j = 0; j < def.length; j++) { | |
arr.push([ def[j], val[def[j]] ]); |
This file contains 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 animatedQuestions = function () { | |
var questions = $('.question-outer'); | |
if (questions.length !== 0) { | |
var openQuestion = function (event) { | |
event.preventDefault(); | |
var target = event ? event.target : window.event.srcElement; | |
var parent = target.parentNode.parentNode.parentNode; | |
var qshort = parent.children[0]; | |
var qfull = parent.children[parent.children.length-1]; | |
$(qfull).slideDown().delay(500); |