Skip to content

Instantly share code, notes, and snippets.

View bmelton's full-sized avatar
💭
I may be slow to respond.

Barry Melton bmelton

💭
I may be slow to respond.
View GitHub Profile
<!--[if IE]><link rel="shortcut icon" href="path/to/favicon.ico"><![endif]-->
<link rel="icon" href="path/to/favicon.png">
@bmelton
bmelton / gist:7947930
Last active December 31, 2015 06:29
Modal HTML Content
<style type="text/css">
.dialogOpen #wrap {
opacity: .5; background-color: black; position: fixed; top: 0; right: 0; bottom: 0; left: 0;
}
#wrap {opacity: 0;}
#modal {
font: 14px Arial, sans-serif; -webkit-box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5); z-index: 999;
color: black; background: white; position: fixed; width: 8 0%; top: 30%; left: 50%;
margin: -25% 0 0 -45%;transform: scale(1.5);opacity: 0; pointer-events: none; padding: 0px 20px 20px 20px;
min-height: 80px; -webkit-border-radius: 5 px;
@bmelton
bmelton / derrick_01
Last active December 20, 2015 06:59
How to swap a div or something like that.
Your HTML should look something like this.
<div id="container">
<div id="target_div">
<div class="target" id="target_01"><h2>Research Driven</h2><p>Blah blah blah.</p></div>
<div class="target" id="target_02"><h2>Some other content</h2><p>And stuff like that.</p></h2></div>
<div class="target" id="target_03"><h2>Some other content</h2><p>And stuff like that.</p></h2></div>
<div class="target" id="target_04"><h2>Some other content</h2><p>And stuff like that.</p></h2></div>
</div>
<div id="buttons">
@bmelton
bmelton / home.html
Created November 15, 2012 02:16
Home.html extends base.html
{% extends "base.html" %}
{% block site_name %}{{ blog.name }}{% endblock %}
{% block main %}
{% for entry in entries %}
<div class="entry">
<h1><a href="{{ entry.get_absolute_url() }}">{{ entry.title }}</a></h1>
<p class="date">{{ entry.pretty_date }}</p>
<div class="entry_content">
@bmelton
bmelton / base.html
Created November 15, 2012 02:14
Typemotion theme examples
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--><html lang="en"> <!--<![endif]-->
<head>
<title>{% block title %}{{ blog.name }}{% endblock %}</title>
<link rel="icon" href="/static/img/favicon.ico" />
<meta name="description" content="Sympodial is the home of Barry Melton, an Annapolis-based web developer." />
<meta name="keywords" content="Annapolis, Baltimore, DC, Web, Developer, HTML, CSS, Python, AJAX, Javascript" />
<img src="boat.gif" alt="Big Boat" />
`1234567890-=[]\;',././.,';\][=-0987654321`~!@#$%^&*()_+{}|:"<>?
☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼»░▓│┤
@bmelton
bmelton / 1
Created April 23, 2012 00:27
annotate issues
Follow(models.Model):
user = models.ForeignKey(User)
content_type = models.ForeignKey(ContentType)
object_id = models.PositiveIntegerField()
content_object = generic.GenericForeignKey('content_type', 'object_id')
created = models.DateTimeField()
description = models.CharField(max_length=255, null=True, blank=True)
def __unicode__(self):
return "%s: %s" % (self.user, self.description)
@bmelton
bmelton / gist:2385010
Created April 14, 2012 14:58
Extremely Gentle Meteor - First HTML
<head>
<title>meteor-intro</title>
</head>
<body>
{{> hello}}
</body>
<template name="hello">
<div class="hello">
@bmelton
bmelton / gist:2384744
Created April 14, 2012 14:25
Extremely Gentle Meteor - First JS
if (Meteor.is_client) {
Template.hello.greeting = function () {
return "Welcome to meteor-intro.";
};
Template.hello.events = {
'click input' : function () {
// template data, if any, is available in 'this'
if (typeof console !== 'undefined')
console.log("You pressed the button");
@bmelton
bmelton / gist:2341138
Created April 9, 2012 03:14
A Gentle Introduction to Ember - Wrapping up Observer
<!doctype html>
<head>
<title>Ember test</title>
<script type="text/javascript" src="../lib/jquery.min.js"></script>
<script type="text/javascript" src="../lib/ember.min.js"></script>
</head>
<body>
<script type="text/x-handlebars">
<img {{bindAttr src="Example.logo"}} alt="Logo"><br />
<h1>{{ Example.name }}</h1>