Skip to content

Instantly share code, notes, and snippets.

View brandonhilkert's full-sized avatar

Brandon Hilkert brandonhilkert

View GitHub Profile
[09:25:58] bhilkert [~/Dropbox/code/perform] (master) $ time rake minitest:models
Run options: --seed 16502
# Running tests:
.....................
Fabulous tests in 0.219871s, 95.5105 tests/s, 122.7993 assertions/s.
21 tests, 27 assertions, 0 failures, 0 errors, 0 skips
[04:09:15] bhilkert [~/Dropbox/code/perform] (master) $ time rake test TEST=test/controllers/people_controller_test.rb
Run options: --seed 26766
# Running tests:
...............
Fabulous tests in 0.575817s, 26.0499 tests/s, 60.7832 assertions/s.
15 tests, 35 assertions, 0 failures, 0 errors, 0 skips
# I need every 6 months from a specific month AND day
Recurrence.new(
every: :month,
interval: 6,
on: [month, day]
).next
# But :on doesn't take an array for the month option
<% if @goals.present? %>
<%= render @goals %>
<% else %>
<%= render "no_goals" %>
<% end %>
<!DOCTYPE html>
<html>
<head>
<title>jQuery Cookie + MailChimp</title>
<meta charset="utf-8">
</head>
<body>
<form action="XXX" method="post" class="signup">
<h1>The First Step!</h1>
Click below to convert:
<a href="/demo/first">First convert</a>
<script>
var s = document.createElement("script");
s.setAttribute("type", "text/javascript");
s.setAttribute("src", "//www.funneloptimizer.io/funnel.js");
s.onload = function() {
FO.Funnel.app = "bf3633943d";
FO.Funnel.init();
};
document.getElementsByTagName('body')[0].appendChild(s);
</script>
<script>
var s = document.createElement("script");
s.setAttribute("type", "text/javascript");
s.setAttribute("src", "//www.funneloptimizer.io/conversion.js");
s.onload = function() {
FO.Conversion.app = "bf3633943d";
FO.Conversion.funnel = "dc3336943a";
FO.Conversion.send();
};
document.getElementsByTagName('body')[0].appendChild(s);
<script>
var s=document.createElement("script");s.setAttribute("type","text/javascript");s.setAttribute("src","//www.funneloptimizer.io/conversion.js");s.onload=function(){FO.Conversion.app="bf3633943d";FO.Conversion.funnel="dc3336943a";FO.Conversion.send()};document.getElementsByTagName("body")[0].appendChild(s)
</script>
<script>
var s=document.createElement("script");s.setAttribute("type","text/javascript");s.setAttribute("src","//www.funneloptimizer.io/funnel.js");s.onload=function(){FO.Funnel.app="bf3633943d";FO.Funnel.init()};document.getElementsByTagName("body")[0].appendChild(s)
</script>
<div data-funnel="dc3336943a">
</div>