Skip to content

Instantly share code, notes, and snippets.

/*!
* Bootstrap v1.3.0
* Modified for Sinatra Tutorial
* ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
html, body {
margin: 0;
padding: 0;
}
h1,
h2,
@DruRly
DruRly / reverse_geocode.rb
Last active December 10, 2015 21:08
Reverse Geocoding Output
[#<Geocoder::Result::Google:0x007fb18d5c0ff8
@cache_hit=nil,
@data=
{"address_components"=>
[{"long_name"=>"A344", "short_name"=>"A344", "types"=>["route"]},
{"long_name"=>"Wiltshire",
"short_name"=>"Wiltshire",
"types"=>["administrative_area_level_2", "political"]},
{"long_name"=>"England",
"short_name"=>"England",
@DruRly
DruRly / gist:4743407
Created February 9, 2013 01:29
Event html
<!DOCTYPE html>
<html>
<head>
<title>WhenNWhere</title>
<link href="/assets/application.css?body=1" media="all" rel="stylesheet" type="text/css" />
<link href="/assets/events.css?body=1" media="all" rel="stylesheet" type="text/css" />
<script src="/assets/jquery.js?body=1" type="text/javascript"></script>
<script src="/assets/jquery_ujs.js?body=1" type="text/javascript"></script>
<script src="/assets/events.js?body=1" type="text/javascript"></script>
<script src="/assets/application.js?body=1" type="text/javascript"></script>
@DruRly
DruRly / stack_trace
Created May 24, 2013 18:54
net/http timeout issue in production
Timeout::Error - Timeout::Error:
/usr/share/ruby/1.9/net/protocol.rb:146:in `rescue in rbuf_fill'
/usr/share/ruby/1.9/net/protocol.rb:140:in `rbuf_fill'
/usr/share/ruby/1.9/net/protocol.rb:122:in `readuntil'
/usr/share/ruby/1.9/net/protocol.rb:132:in `readline'
/usr/share/ruby/1.9/net/http.rb:2562:in `read_status_line'
/usr/share/ruby/1.9/net/http.rb:2551:in `read_new'
/usr/share/ruby/1.9/net/http.rb:1319:in `block in transport_request'
/usr/share/ruby/1.9/net/http.rb:1316:in `catch'
/usr/share/ruby/1.9/net/http.rb:1316:in `transport_request'
'use strict';
var lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet;
var mountFolder = function (connect, dir) {
return connect.static(require('path').resolve(dir));
};
module.exports = function (grunt) {
// load all grunt tasks
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
grunt.loadNpmTasks('grunt-haml');
@DruRly
DruRly / app.js
Created August 7, 2013 10:47 — forked from pixelhandler/app.js
var application_root = __dirname,
express = require("express"),
path = require("path"),
mongoose = require('mongoose');
var app = express.createServer();
// database
mongoose.connect('mongodb://localhost/ecomm_database');
@DruRly
DruRly / App.js
Last active May 22, 2019 18:45
Color Theme Generator (Skateboard)
import React from "react"
import "./App.css"
const Color = props => {
return (
<div style={{ backgroundColor: props.color }}>
<h1>{props.color}</h1>
</div>
)
}
@DruRly
DruRly / App.js
Last active May 22, 2019 22:58
Color Theme Generator (Scooter 1/2)
import React, { useState } from "react"
import "./App.css"
const Color = props => {
return (
<div style={{ backgroundColor: props.color }}>
<h1>{props.color}</h1>
</div>
)
}
@DruRly
DruRly / App.js
Last active May 28, 2019 16:16
Color Theme Generator (Scooter 2/2)
import React, { useState } from "react"
import "./App.css"
const Color = props => {
return (
<div style={{ backgroundColor: props.color.value }}>
<h1>{props.color.value}</h1>
<h3>Locked: {props.color.locked.toString()}</h3>
<input
name="isLocked"
@DruRly
DruRly / App.js
Last active May 23, 2019 17:59
Color Theme Generator (Bike)
import React, { useState } from "react"
import "./App.css"
const Color = props => {
return (
<div style={{ backgroundColor: props.color.value }}>
<h1>{props.color.value}</h1>
<h3>Locked: {props.color.locked.toString()}</h3>
<input
name="isLocked"