Skip to content

Instantly share code, notes, and snippets.

View ryanclark2's full-sized avatar

Ryan Clark ryanclark2

View GitHub Profile
body {
margin: 35px auto;
width: 640px;
}
header {
text-align: center;
margin: 0 0 20px;
}
@ryanclark2
ryanclark2 / index.html
Created May 15, 2012 00:29
Custom Marker
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="http://code.leafletjs.com/leaflet-0.3.1/leaflet.css" />
<link rel="stylesheet" href="style.css" />
<link rel="stylesheet" href="/bootstrap/css/bootstrap.css" />
<link rel="icon" type="image/png" href="http://cleversketch.com/blog/wp-content/uploads/2011/11/Pencil1.png">
<!--[if lte IE 8]>
<link rel="stylesheet" href="http://code.leafletjs.com/leaflet-0.3.1/leaflet.ie.css" />
<![endif]-->
@ryanclark2
ryanclark2 / index.html
Created May 15, 2012 01:05
Costom Marker
<script src="/Leaflet/dist/leaflet.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<div id="map" style="height: 700px"></div>
<script>
var map = new L.Map('map');
var cloudmade = new L.TileLayer('http://{s}.tile.cloudmade.com/4a94630d171f47a9a62cf3c7fc99de47/997/256/{z}/{x}/{y}.png', {
attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="http://cloudmade.com">CloudMade</a>',
maxZoom: 18
});
@ryanclark2
ryanclark2 / AjaxCall
Created June 7, 2012 16:44
One Ajax Call
$.ajax({
url: "http://api.wunderground.com/api/cd48ac26fb540679/conditions/q/pws:KCASANFR128.json",
dataType: "jsonp",
success: function(parsed_json) {
var location = parsed_json['current_observation']['observation_location']['city'];
var temp_f = parsed_json['current_observation']['temp_f'];
var weather = parsed_json['current_observation']['weather'].toLowerCase();
var iconUrl = parsed_json['current_observation']['icon_url'];
var iconPic = new MyIcon(iconUrl);
var markerRichmond = new L.Marker(new L.LatLng(37.779806, -122.471895), {icon: iconPic});
@ryanclark2
ryanclark2 / MigrateError
Created July 10, 2012 18:43
Migrate error
$ rake db:migrate
== CreateWarehouseTransactionStateTransitions: migrating =====================
-- create_table(:warehouse_transaction_state_transitions)
-> 0.0641s
-- add_index(:warehouse_transaction_state_transitions, :warehouse_transaction_id)
rake aborted!
An error has occurred, this and all later migrations canceled:
Index name 'index_warehouse_transaction_state_transitions_on_warehouse_transaction_id' on table 'warehouse_transaction_state_transitions' is too long; the limit is 63 characters
@ryanclark2
ryanclark2 / Anatomy.md
Last active December 22, 2015 13:59
Anatomy of a Rails App
-ShinyNewRailsApp
 |-app/
 |---assets/
 |-----images/
 |-----javascripts/
 |------application.js
 |-----stylesheets/
 |------application.css
 |---controllers/
<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="2.4" jmeter="2.9 r1437961">
<hashTree>
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="TestPlan" enabled="true">
<stringProp name="TestPlan.comments"/>
<boolProp name="TestPlan.functional_mode">false</boolProp>
<boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
<elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="TestPlan" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
@ryanclark2
ryanclark2 / gist:8567429
Created January 22, 2014 21:12
Gemfile
source 'https://rubygems.org'
# server
ruby "2.0.0"
gem 'rails', '3.2.13'
gem 'pg'
gem 'newrelic_rpm'
gem 'nokogiri'
ninefold help
Commands:
ninefold app SUBCOMMAND # manage your apps
ninefold brutus SUBCOMMAND # make Brutus do things
ninefold console # shortcut for app:console
ninefold db SUBCOMMAND # manage your databases
ninefold dbconsole # shortcut for app:dbconsole
ninefold help [COMMAND] # Describe available commands or one specific command
ninefold logs # shortcut for app:logs
ninefold rake # shortcut for app:rake
…ionpack-4.2.0/lib/action_dispatch/routing/
route_set.rb: 271:in `call'
…ionpack-4.2.0/lib/action_dispatch/routing/
route_set.rb: 222:in `call'
…ionpack-4.2.0/lib/action_dispatch/routing/
route_set.rb: 334:in `block (2 levels) in define_url_helper'
…pack-4.2.0/lib/action_dispatch/routing/
routes_proxy.rb: 31:in `new_user_session_url'
…ruby/2.2.0/gems/devise-3.4.1/lib/devise/
failure_app.rb: 119:in `scope_url'