Skip to content

Instantly share code, notes, and snippets.

View neroze's full-sized avatar
🎯
Focusing

Jumper neroze

🎯
Focusing
View GitHub Profile
@neroze
neroze / SpecRunner.js
Created June 9, 2017 09:37 — forked from michaelcox/SpecRunner.js
Browser Unit Testing with Backbone Mocha Chai and RequireJS
require.config({
baseUrl: '/backbone-tests/',
paths: {
'jquery' : '/app/libs/jquery',
'underscore' : '/app/libs/underscore',
'backbone' : '/app/libs/backbone',
'mocha' : 'libs/mocha',
'chai' : 'libs/chai',
'chai-jquery' : 'libs/chai-jquery',
'models' : '/app/models'
@neroze
neroze / wp-get_id_by_slug
Created March 14, 2017 08:15 — forked from davidpaulsson/wp-get_id_by_slug
WordPress: Get page ID from slug
// Usage:
// get_id_by_slug('any-page-slug');
function get_id_by_slug($page_slug) {
$page = get_page_by_path($page_slug);
if ($page) {
return $page->ID;
} else {
return null;
}
@neroze
neroze / wp-get_id_by_slug
Created March 14, 2017 08:15 — forked from davidpaulsson/wp-get_id_by_slug
WordPress: Get page ID from slug
// Usage:
// get_id_by_slug('any-page-slug');
function get_id_by_slug($page_slug) {
$page = get_page_by_path($page_slug);
if ($page) {
return $page->ID;
} else {
return null;
}
if ( class_exists( 'WPBakeryShortCodesContainer' ) ) {
class WPBakeryShortCode_Team_Wrapper extends WPBakeryShortCodesContainer {
}
}
if ( class_exists( 'WPBakeryShortCode' ) ) {
class WPBakeryShortCode_Team_Mate extends WPBakeryShortCode {
}
}
function team_mate_block_function( $atts, $content ) {
extract( shortcode_atts( array(
'name' => '',
'status' => '',
'profile_image' => '',
'description' => ''
), $atts ) );
ob_start();
?>
function team_wrapper_block_function( $atts, $content ) {
extract( shortcode_atts( array(
'el_class' => ''
), $atts ) );
ob_start();
echo '<section class="team-wrapper">
<div class="team-thumbnail">
vc_map( array(
"name" => __("Team Mate", "rhthm"),
"base" => "team_mate",
'category' =>__('Team', 'rhthm'),
"content_element" => true,
"as_child" => array('only' => 'team_wrapper'), // Use only|except attributes to limit parent (separate multiple values with comma)
"params" => array(
// add params same as with any other content element
array(
"type" => "textfield",
vc_map( array(
"name" => __("Team Wrapper", "my-text-domain"),
"base" => "team_wrapper",
'category' =>__('Team', 'rhthm'),
"as_parent" => array('only' => 'team_mate'), // Use only|except attributes to limit child shortcodes (separate multiple values with comma)
"content_element" => true,
"show_settings_on_create" => false,
"is_container" => true,
"js_view" => 'VcColumnView'
) );
{
"name": "react-hello-world",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
var gulp = require("gulp");
var gutil = require("gulp-util");
var webpack = require("webpack");
var webpack = require('webpack-stream');
var webpackConfig = require("./webpack.config.js");
var uglify = require('gulp-uglify');
// The development server (the recommended option for development)
gulp.task("default", ["webpack:build-dev"]);