Create droplet of your liking (ubuntu 12.10 x32)
ssh to root in terminal with your server ip
ssh [email protected]
Add ssh fingerprint and enter password provided in email
def mobile? | |
true if /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.match(request.user_agent) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|k |
// --------------- CART | |
aside#cart{ | |
position:fixed; | |
top:0%; | |
right:-100%; | |
z-index:9999; | |
width:100%; | |
height:300px; | |
#closeCart{ | |
cursor:pointer; |
"#{request.protocol}#{request.host_with_port}#{request.fullpath}" |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8 /> | |
<title></title> | |
<link rel="stylesheet" type="text/css" media="screen" href="css/master.css" /> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> | |
<!--[if IE]> | |
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> | |
<![endif]--> |
function has(obj, prop) { | |
return Object.prototype.hasOwnProperty.call(obj, prop); | |
} |
<div class="row"> | |
<div class="large-12 columns calendar-container"> | |
<h3 class="month"> | |
<a href="/admin/analytics?class=cal-larr&date=2013-11-01"><</a> | |
December 2013 | |
<a href="/admin/analytics?class=cal-rarr&date=2014-01-01">></a> | |
</h3> | |
<section class="calendar" role="main"> | |
<ul class="day-row"> | |
<li class="day">SUN</li> |
module CalendarHelper | |
def calendar(date = Date.today, &block) | |
Calendar.new(self, date, block).table | |
end | |
class Calendar < Struct.new(:view, :date, :callback) | |
HEADER = %w[SUN MON TUE WED THU FRI SAT] | |
START_DAY = :sunday | |
delegate :content_tag, to: :view |
Create droplet of your liking (ubuntu 12.10 x32)
ssh to root in terminal with your server ip
ssh [email protected]
Add ssh fingerprint and enter password provided in email
## Importing Data from CSV to Rails psql | |
## Code is essentially ripped from: | |
## here: http://stackoverflow.com/questions/14534522/ruby-csv-parsing-string-with-escaped-quotes (thanks!) | |
## and here: http://technicalpickles.com/posts/parsing-csv-with-ruby/ (double thanks!) | |
## using Sequel Pro for OSX to tear up / navigat the murkey waters of a Wordpress Database | |
csv_data = File.read('data.csv').gsub(/\\"/,'""') | |
csv = CSV.new(csv_data, {headers: true}) | |
arrayed_csv = csv.to_a |
Yo Yo. Emcee Noesis. |