Skip to content

Instantly share code, notes, and snippets.

View arbales's full-sized avatar

Austin Bales arbales

View GitHub Profile
box-shadow: #FFF 0 1px 0 inset, #000 0 1px 3px
From bfdf78d7d500820f18a00eef24dad0f70d122ba2 Mon Sep 17 00:00:00 2001
From: Austin Bales <austin@manymoon.com>
Date: Wed, 31 Aug 2011 15:57:42 -0700
Subject: [PATCH] Fix for landscape on mobile browsers.
---
app/assets/stylesheets/pages.css.sass | 7 +++++--
app/views/layouts/pages.html.haml | 3 ++-
2 files changed, 7 insertions(+), 3 deletions(-)
%section.social
%fb:like{href:"", send: "false", layout: "button_count", width: "", show_faces: "false", style: 'bottom: 3px'}
%g:plusone{size: "medium"}
%a{href: "http://twitter.com/share", class: "twitter-share-button", 'data-count' => "horizontal", 'data-text' => 'Do is an exciting new app launching soon. Sign up to be the first to receive an invite.', 'data-url' => 'http://do.com', 'data-via' => 'anditsdone'} Tweet
- content_for :javascripts do
#fb-root
:plain
<script src="http://connect.facebook.net/en_US/all.js#appId=166087366802364&amp;xfbml=1"></script>
<script src="http://platform.twitter.com/widgets.js"></script>
# Read more at coffeescript.org
$ -> # $(function() {...}
# Note: you had an extra call fo $(document).ready. The call above is actually the same thing.
$('.wrapper').css 'overflow-x', 'hidden'
$('#slider-name a').click ->
$('#slider-nav a').removeClass 'selected'
$(this).addClass 'selected'
@arbales
arbales / vwo.coffee
Created August 25, 2011 19:08
vwo is dumb.
_vwo_code = do ->
account_id = 0000
settings_tolerance = 1500
library_tolerance = 3000
use_existing_jquery = false
# DO NOT EDIT BELOW THIS LINE
f = false
d = document
{
use_existing_jquery: ->
_.cycle = (arr) ->
->
arr.push arr.shift()
arr[0]
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://lotr/;
proxy_redirect off;
}
Endor.Utils.formatLinks = (content) ->
safeContent = Handlebars.Utils.escapeExpression(content)
safeContent = safeContent.replace LINK_DETECTION_REGEX, (url) ->
address = if /[a-z]+:\/\//.test url then url else "http://#{url}"
"<a href='#{address}' target='_blank'>#{url}</a>"
new Handlebars.SafeString(safeContent) # Mark our string as safe, since it is.
@arbales
arbales / gist:1075626
Created July 11, 2011 09:54
Bluepill used at Halftoneapp.com
#
# Halftoneapp.com Sample Bluepill Configuration File
# Read more at: http://blog.halftoneapp.com
#
# Set paths
home_dir = "/home/railsapp"
rails_shared = "#{home_dir}/app/shared"
unicorn_path = "/path/to/unicorn_rails"
// As a param
$.ajax({
url: "/api/v1/kittens",
parameters: {name: "Sillycat", breed: "Tiger", token: "4815162342"},
success: function(){
// kitten created
}
});