Opinions are like assholes, every one has got one.
This one is mine.
Punctuation is a bikeshed. Put your semicolons, whitespace, and commas where you like them.
function rkv_referr_source() { ?> | |
<script type="text/javascript"> | |
// build function for cookie process | |
function rkv_grab_cookie() { | |
// check document referrer | |
if (document.referrer !== '') | |
var rkv_val = document.referrer; |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>CartoDB Sketch View</title> | |
<script type="text/javascript" src="../js/core.js"></script> | |
<script type="text/javascript" src="../js/settings.js"></script> | |
<script type="text/javascript" src="../js/mercator.js"></script> | |
<script type="text/javascript" src="../js/geometry.js"></script> | |
<script type="text/javascript" src="../js/model.js"></script> |
<?php | |
function roots_root_relative_url($input) { | |
$output = preg_replace_callback( | |
'!(https?://[^/|"]+)([^"]+)?!', | |
create_function( | |
'$matches', | |
// if full URL is site_url, return a slash for relative root | |
'if (isset($matches[0]) && $matches[0] === site_url()) { return "/";' . | |
// if domain is equal to site_url, then make URL relative |
/* | |
* Portions of this code and logic copied from OpenLayers and | |
* redistributed under the original Clear BSD license terms: | |
* | |
* http://trac.osgeo.org/openlayers/browser/license.txt | |
* | |
* Copyright 2005-2010 OpenLayers Contributors, released under | |
* the Clear BSD license. See authors.txt for a list of contributors. | |
* All rights reserved. | |
* |
<html> | |
<head> | |
<title>I'm learning</title> | |
<link rel="stylesheet" href="http://code.leafletjs.com/leaflet-0.3.1/leaflet.css" /> | |
<script src="http://code.leafletjs.com/leaflet-0.3.1/leaflet.js"></script> | |
<script src="http://zeptojs.com/zepto.js" type="text/javascript"></script> | |
<script src="map.js" type="text/javascript"></script> | |
<style> | |
body {margin: 0; padding: 0; text-align: center;} | |
#button { -webkit-transition: -webkit-transform 3s ease-in; box-shadow: 0 0 25px #EFEF4D; margin: auto; margin-top: 15px; padding: 3px 6px; height: 20px; width: 200px;} |
#If you don't have Postgres installed yet: | |
# https://github.com/tsaleh/tammer-saleh/blob/master/views/posts/installing-postgresql-for-rails-3-1-on-lion.html.textil | |
#1. Install postgis 1.5.3. Latest is 2.0.0, so using url old formula on github | |
brew install https://raw.github.com/mxcl/homebrew/8a04a43763906e6a9bef68881acf997f3a6f6687/Library/Formula/postgis.rb | |
#2. Create a template to be used on creating GIS-enabled databases | |
createdb template_postgis | |
#3. Import Postgis Data |
// Session | |
require(['models/session'], function(Session) { window.Session = Session }); | |
s = new Session(); | |
s.fetch(); | |
// Returns a Session model with the following: | |
// - attributes contain simple attributes | |
// - trips (TripList) a collection of Trip models; 'light' versions. | |
// - user (User) the logged in user; check its attributes for email and name. | |
// - expenseCategories | |
// - expensePaymentTypes |
<?php | |
add_action ('wp_head', 'rkv_new_redirects', 1); // create redirects | |
function rkv_new_redirects() { | |
$newurl = 'http://mynewurl.com'; | |
$slug = basename(get_permalink()); | |
$cat = get_query_var('cat'); | |
$cat_s = get_category ($cat); | |
$c_slug = $cat_s->slug; | |
// set up |
<!doctype html> | |
<html> | |
<head> | |
<title>Divshot Welcome - Welcome to Divshot (Divshot Prototype)</title> | |
<meta http-equiv="content-type" content="text/html;charset=UTF-8" /> | |
<script type='text/javascript' src='http://divshot.dev/assets/preview.js'></script> | |
<link rel='stylesheet' href='http://divshot.dev/assets/preview.css' /> | |
</head> | |
<body> | |
<div class='container-fluid'> |