Skip to content

Instantly share code, notes, and snippets.

View justjohn's full-sized avatar

John Roepke justjohn

View GitHub Profile
####################################
# BASIC REQUIREMENTS
# http://graphite.wikidot.com/installation
# http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/
# Last tested & updated 10/13/2011
####################################
cd
sudo apt-get update
sudo apt-get upgrade
@justjohn
justjohn / twigView.js
Created February 26, 2013 22:35
Twig.js BackBone View
define(
["jquery", "backbone", "twig", "q"],
function($, Backbone, Twig, Q) {
return Backbone.View.extend({
tagName: "div"
, ready: function() {
return this.templateReady.promise;
}
@justjohn
justjohn / iptables.up.rules
Last active December 11, 2015 19:48
iptables rules for a KVM host box
*filter
# Accepts all established inbound connections
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
# Allows all outbound traffic
-A OUTPUT -j ACCEPT
# Allows HTTP and HTTPS connections from anywhere
-A INPUT -p tcp --dport 443 -j ACCEPT
@justjohn
justjohn / tweet.twig
Created February 21, 2012 15:39
Template for a tweet
<div class="userPicture">
<a href="http://twitter.com/{{ user.screen_name }}"><img src="{{ user.profile_image_url }}" alt="" /></a>
</div>
<div class="content">
<div class="date">{{ created_at|date("M j, Y @ g:i a") }}</div>
<div class="user">
<span class="name"><a href="{{ user.url }}">{{ user.name }}</a></span>
<span class="handle"><a href="http://twitter.com/{{ user.screen_name }}">{{ user.screen_name }}</a></span>
</div>
<div class="text">{{ text }}</div>
@justjohn
justjohn / tweetView.js
Created February 21, 2012 15:38
Backbone view for a tweet
module.declare(
[
{ backbone: 'vendor/backbone' }
, { twig: "vendor/twig" }
, { tweet: "js/model/tweet" }
]
, function (require, exports, module) {
var Backbone = require("backbone")
, twig = require("twig").twig
@justjohn
justjohn / gist:1877060
Created February 21, 2012 15:36
Wrappers for Backbone and Underscore as CommonJS Modules/2.0
// NEW underscore.js
module.declare([], function (require, exports, module) {
// Contents of underscore.js
// Backbone expects require("underscore") to be _
// so let's make it so.
exports._.extend(exports, exports._);
});
// NEW backbone.js
@justjohn
justjohn / jquery-mobile-red-buttons.css
Created July 1, 2011 04:03
Red button CSS for JQuery Mobile
/* Red button theme for JQuery Mobile
* - Use data-theme="r" for red versions of the default JQuery Mobile Buttons.
******************************************************************************************/
.ui-btn-up-r {
border: 1px solid #721414;
background: #AB2525;
font-weight: bold;
color: #fff;
text-shadow: 0 -1px 1px #000;