Skip to content

Instantly share code, notes, and snippets.

View jordanhudgens's full-sized avatar

Jordan Hudgens jordanhudgens

View GitHub Profile
@jordanhudgens
jordanhudgens / ga
Created May 21, 2015 19:41
gadetails
Track Pageview
ga_debug.js:24 Found UA client id
analytics_debug.js:9 Initializing Google Analytics.
analytics_debug.js:9 Running command: ga("create", "UA-55113418-1", "auto")
analytics_debug.js:9 Creating new tracker: t0
analytics_debug.js:9 Auto cookieDomain found: "none"
analytics_debug.js:9 Running command: ga("send", "pageview")
analytics_debug.js:9
Sent beacon:
v=1&_v=j36d&a=2106000679&t=pageview&_s=1&dl=http%3A%2F%2Flocalhost%2Forders%2Fthanks.1957&ul=en-us&de=UTF-8&dt=quip&sd=24-bit&sr=2560x1080&vp=1265x467&je=1&fl=17.0%20r0&_u=AACAAEABI~&jid=&cid=1620357248.1427595649&tid=UA-55113418-1&z=1145217400
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol ) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker('UA-55113418-1');
pageTracker._trackPageview();
var order = <%= raw @order.to_json %>;
<% if flash[:notice] %>
<div class = "alert alert-success">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<%= flash[:notice] %>
</div>
<% elsif flash[:error] %>
<div class = "alert alert-danger">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<%= flash[:error] %>
</div>
require 'rubygems'
require 'dish'
hash = {
movie: "Star Wars",
actors: [
{ age: 22, name: "Luke" },
{ age: 35, name: "Han" },
{ age: 400, name: "Yoda" }
],
class Baseball
end
p Baseball.new.swing
class Baseball
end
class Baseball
def swing
require 'rubygems'
require 'httparty'
# Base Example
class EdutechionalResty
include HTTParty
base_uri 'edutechional-resty.herokuapp.com'
def posts
self.class.get("/posts.json")
def bubble_sort(array)
n = array.length
loop do
swapped = false
(n-1).times do |i|
if array[i] > array[i+1]
array[i], array[i+1] = array[i+1], array[i]
swapped = true
end
<%= div_for(@post, class: "post-index-page") do %>
  <p><strong><%= @post.title %></strong> <%= @post.summary %></p>
<% end %>
<%= div_for(@post, class: "post-index-page") do %>
  <p><strong><%= @post.title %></strong> <%= @post.summary %></p>
&lt;% end %&gt;
Kaminari.configure do |config|
config.page_method_name = :per_page_kaminari
end
if defined?(WillPaginate)
module WillPaginate
module ActiveRecord
module RelationMethods
alias_method :per, :per_page
alias_method :num_pages, :total_pages
end
end
end
end