Skip to content

Instantly share code, notes, and snippets.

View jeffstephens's full-sized avatar

Jeff Stephens jeffstephens

View GitHub Profile
@jeffstephens
jeffstephens / crudeparse.php
Last active August 29, 2015 14:09
A really messy way to quickly parse an HTML document.
// HTML structure
<html>
<body>
<table id="transactions">
<tr><td>Nov 8 2014</td><td>Chipotle</td><td>6.83</td></tr>
<tr><td>Nov 9 2014</td><td>Wok Eat</td><td>9.13</td></tr>
<tr><td>Nov 10 2014</td><td>Hazel's Beverage World</td><td>321.54</td></tr>
</table>
</body>
</html>
@jeffstephens
jeffstephens / jQuery-textarea.html
Created May 25, 2013 00:32
Quick jQuery demo for setting textarea contents and using html() in general
<!doctype html>
<head>
<title>Textarea Default Values</title>
<link type="text/css" rel="stylesheet" href="bootstrap/css/bootstrap.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
<script src="bootstrap/js/bootstrap.js" type="text/javascript"></script>
<script type="text/javascript">
function setDynamic(id){
var text = prompt("Enter your desired text.");
$('#' + id).html(text);
@jeffstephens
jeffstephens / responsive.css
Created September 4, 2012 22:04
A great responsive layout that flows nicely to any size screen
/* A responsive layout that should
* adjust nicely to any screen size!
*/
#topbar{
width: 80%;
margin: auto;
padding: 1%;
text-align: right;
}
@jeffstephens
jeffstephens / fixed.css
Created September 4, 2012 22:02
A great fixed-width layout!
/* Great fixed layout! It looks pixel-perfect
* anywhere but doesn't scale well.
*/
#topbar{
width: 785px;
padding: 5px;
text-align: right;
}