Skip to content

Instantly share code, notes, and snippets.

View jmdrawneek's full-sized avatar

James Drawneek jmdrawneek

  • Home Agency
  • Leeds, West Yorkshire, UK
View GitHub Profile
<?php /* Template Name: Blank */ ?>
<?php get_header(); ?>
<div class="row">
<div id="primary" class="content-area small-12 large-8 columns">
<?php
function move_element( $markup, $selector, $direction, $levels ) {
// Load it
$html = new DOMDocument();
$html->loadHTML( $markup );
$finder = new DomXPath($html);
$firstItem = $finder->query("//*[contains(@class, 'hero-quiz__user-detail__label gfield_label')]")->item(0);
$node = $finder->query("//*[contains(@class, '" . $selector . "')]")->item(0);
$copy = $node->cloneNode(true);
$ul = $finder->query("//input")->item(0);
function _f10_update_makrup_attribute ($content, $xpath_target, $values) {
$dom = new DOMDocument();
$dom->loadHTML($content, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
// Evaluate P tags in HTML. This just shows
// that you can be more selective on your tags
$xpath = new DOMXPath($dom);
$tags = $xpath->evaluate("//" . $xpath_target);
// Loop through all the found tags
/Users/JimCurve/.rvm/gems/ruby-2.2.1/gems/livingstyleguide-1.2.2/lib/livingstyleguide/command_line_interface.rb:30:in `read': No such file or directory @ rb_sysopen - sass/styleguide.lsg (Errno::ENOENT)
from /Users/JimCurve/.rvm/gems/ruby-2.2.1/gems/livingstyleguide-1.2.2/lib/livingstyleguide/command_line_interface.rb:30:in `input'
from /Users/JimCurve/.rvm/gems/ruby-2.2.1/gems/livingstyleguide-1.2.2/lib/livingstyleguide/command_line_interface.rb:15:in `block in compile'
from /Users/JimCurve/.rvm/gems/ruby-2.2.1/gems/tilt-2.0.1/lib/tilt/template.rb:77:in `call'
from /Users/JimCurve/.rvm/gems/ruby-2.2.1/gems/tilt-2.0.1/lib/tilt/template.rb:77:in `initialize'
from /Users/JimCurve/.rvm/gems/ruby-2.2.1/gems/livingstyleguide-1.2.2/lib/livingstyleguide/command_line_interface.rb:14:in `new'
from /Users/JimCurve/.rvm/gems/ruby-2.2.1/gems/livingstyleguide-1.2.2/lib/livingstyleguide/command_line_interface.rb:14:in `compile'
from /Users/JimCurve/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/command.rb:27:in `run
[!] There was an error parsing `Gemfile`: syntax error, unexpected tIDENTIFIER, expecting end-of-input - source 'https://rubygems.org' gem 'livingstyleguide'
^. Bundler cannot continue.
# from /Volumes/ScratchSSD/websites/lvhppr/sites/all/themes/lvhppr_omega_theme/Gemfile:1
# -------------------------------------------
> source 'https://rubygems.org' gem 'livingstyleguide'
# -------------------------------------------
Error: Command failed: /bin/sh -c bundle exec livingstyleguide compile /Volumes/ScratchSSD/websites/lvhppr/sites/all/themes/lvhppr_omega_theme/sass/styleguide.lsg;
/Users/JimCurve/.rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/dependency.rb:315:in `to_specs': Could not find 'bundler' (>= 0) among 14 total gem(s) (Gem::LoadError)
Checked in 'GEM_PATH=/Users/JimCurve/.gem/ruby/2.2.0:/Users/JimCurve/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0', execute `gem env` for more information
from /Users/JimCurve/.rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/dependency.rb:324:in `to_spec'
from /Users/JimCurve/.rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_gem.rb:64:in `gem'
from /Users/JimCurve/.rvm/gems/ruby-2.2.1/bin/bundle:22:in `<main>'
at ChildProcess.exithandler (child_process.js:203:12)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
@jmdrawneek
jmdrawneek / SassMeister-input.scss
Created January 8, 2015 22:32
Generated by SassMeister.com.
// ----
// Sass (v3.4.9)
// Compass (v1.0.1)
// Zen Grids (v1.4)
// ----
@import "compass";
@import "zen";
@import "compass/css3";
@import "compass/css3/border-radius";