Requires bundler >= 1.4. gem install bundler --pre
if your latest stable is still 1.3.X
Then set global bundler config:
# osx
number_of_cores=`sysctl -n hw.ncpu`
# linux
number_of_cores=`nproc`
sinon = require('sinon'); | |
sinon.spy(window, 'WebSocket') | |
// throws an error (see console) | |
new window.WebSocket("ws://example.com") | |
var a = { | |
b: function() {} | |
} | |
// works |
# config/initializers/carrierwave.rb | |
require 'mini_magick' | |
module CarrierWave | |
module MiniMagick | |
# round _square_ image | |
def round | |
manipulate! do |img| | |
img.format 'png' |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Unboxed test</title> | |
<meta charset="utf-8" /> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.js"></script> | |
<style type="text/css" media="screen"> | |
body { | |
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; |
require 'benchmark' | |
def do_stuff | |
`sleep 0.1` | |
end | |
Benchmark.bm(10) do |x| | |
x.report("sequential") do | |
10.times { do_stuff } | |
end |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> | |
<title>text to music</title> | |
<script type="text/javascript" charset="utf-8" src="./zepto.min.js"></script> | |
</head> | |
<body> | |
<textarea name="" id= rows="40" cols="80"></textarea> | |
<button type="submit">Muse</button> |
source 'https://rubygems.org' | |
gem 'capybara' | |
gem 'poltergeist' |
// | |
// Spinner | |
// -------------------------------------------------- | |
@import "variables"; | |
@import "mixins"; | |
.transform-mix (@deg, @delay) { | |
-webkit-transform: rotate(@deg) translate(0, -142%); | |
-webkit-animation-delay: @delay; |
Requires bundler >= 1.4. gem install bundler --pre
if your latest stable is still 1.3.X
Then set global bundler config:
# osx
number_of_cores=`sysctl -n hw.ncpu`
# linux
number_of_cores=`nproc`
function! GoogleSearch() | |
normal gv"xy | |
let query = 'http://google.com/search?q=' . | |
\ system('perl -MURI::Escape -e "print uri_escape(q#'. escape(@x, '#"') .'#)"') | |
silent execute "! open " . | |
\ shellescape(query, 'yes_please_escape_vim_special_characters_too_thank_you') | |
endfunction | |
vnoremap <Leader>s :call GoogleSearch()<cr> |
shopa's integration with OpenCart is in the form of a model class, ModelShopaButton. This contains methods for building the button on the product page, and for the HTML on the success page.
button.php is to be placed in catalog/model/shopa/button.php