Skip to content

Instantly share code, notes, and snippets.

View LBRapid's full-sized avatar
🏠
Working from home

John Dyer LBRapid

🏠
Working from home
View GitHub Profile
<div class="clearfix" id="ticker">
<p class="tick tick-scroll">23,948,611</p>
</div>
/* Ticker Fixes */
#ticker {
margin: 0 auto;
width: 100%;
}
.demo-box.demo-4 p.tick {
display: inline-block;
overflow: hidden;
padding: 0 10px;
# Here is an example order/cart that would need to be sent
{
"number" => "311174282",
"email" => "spree@example.com",
"currency" => "USD",
"user_id" => "123",
"visit_id" => "6590869538865152",
"visitor_id" => "3821811678576640",
"pageview_id" => "0",
"placed_on" => "2013-07-30T19:19:05Z",
{
"carts": [
{
"id": "TESTJIRAFECART2",
"number": "TESTJIRAFECART2",
"email": "spree@example.com",
"currency": "USD",
"user_id": "123",
"visit_id": "2457020145860608",
"visitor_id": "3821811678576640",
@LBRapid
LBRapid / react1.js
Last active August 29, 2015 14:00
Render a react component from a Backbone router
Backbone.Router.extend({
routes: 'users/index',
index: function() {
var component, users;
users = Users.fetch();
component = UsersIndex({
model: users
});
@LBRapid
LBRapid / reactjsx.js
Created April 21, 2014 17:02
React component with JSX
var CommentBox = React.createClass({
render: function() {
return (
<div className="commentBox">
Hello, world! I am a CommentBox.
</div>
);
}
});
React.renderComponent(
@LBRapid
LBRapid / reactnojsx.js
Created April 21, 2014 17:03
React component without JSX
var CommentBox = React.createClass({
render: function() {
return (
React.DOM.div({
className: 'commentBox',
children: 'Hello, world! I am a CommentBox.'
})
);
}
});
#!/usr/bin/env ruby
$stdout.sync = true
require File.join(File.expand_path('../..', __FILE__), %w[lib falkor])
puts 'You should not run this command with any worker running. Are all workers stopped [y/n]?'
exit 0 unless 'y' == gets.chomp.downcase
puts 'Update all legacy transforms [y/n]?'
if source.split("\n")[0] =~ /nomustache/ or source.empty?
context.eval(source)
context.eval('JSON.stringify(payload)')
else
context['source'] = source
output = context.eval('Mustache.render(source, payload)')
JSON.parse(output)
output
end
#!/usr/bin/env ruby
$stdout.sync = true
require File.join(File.expand_path('../..', __FILE__), %w[lib falkor])
puts 'You should not run this command with any worker running. Are all workers stopped [y/n]?'
exit 0 unless 'y' == gets.chomp.downcase
puts 'Update all legacy transforms [y/n]?'