Skip to content

Instantly share code, notes, and snippets.

View jpetto's full-sized avatar
🪐

Jonathan Petto (they/them) jpetto

🪐
View GitHub Profile
@jpetto
jpetto / results.html
Last active November 9, 2015 15:44
EWT - Performance results chart
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Performance Audit/Improvement Results</title>
<style type="text/css">
html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizi
@jpetto
jpetto / index.html
Created September 14, 2015 19:50
EWT FA 2015 - Sass Homework starter code
<div class="container">
<div class="card card1">
<figure class="face front"><img src="http://placecage.com/300/400"></figure>
<figure class="face back"><img src="http://fillmurray.com/300/400"></figure>
</div>
<div class="card">
<figure class="face front"><img src="http://nicenicejpg.com/300/400"></figure>
<figure class="face back"><img src="http://stevensegallery.com/300/400"></figure>
</div>
@jpetto
jpetto / test_views.py
Last active August 29, 2015 14:22
possible /mozorg/tests/test_views.py fix
@patch('bedrock.mozorg.views.l10n_utils.render')
class TestHome(TestCase):
def setUp(self):
self.rf = RequestFactory()
@override_settings(MOBILIZER_LOCALE_LINK={'en-US': 'His Dudeness', 'de': 'Herr Dude'})
def test_gets_right_mobilizer_url(self, resp_mock):
"""Home page should get correct mobilizer link for locale."""
req = self.rf.get('/')
req.locale = 'de'
@jpetto
jpetto / index.html
Created February 26, 2015 16:01
ASWM SP 2015: Week 5 - Simple API demo
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>API Demo</title>
<style type="text/css">
.error {
color: #f00;
}
@jpetto
jpetto / banner.js
Created February 5, 2015 00:04
ASWM SP2015: wk1 classwork JS
(function() {
'use strict';
// get references to the form fields
var textField = document.querySelector('#text');
var sizeField = document.querySelector('#text-size');
var colorField = document.querySelector('#text-color');
var bgColorField = document.querySelector('#bg-color');
var countField = document.querySelector('#banner-count');
@jpetto
jpetto / hw-week2.html
Created September 9, 2014 15:33
EWT 2014: CSS Columns starter template
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>CSS Columns</title>
<link rel="stylesheet" href="http://necolas.github.io/normalize.css/3.0.1/normalize.css">
<style type="text/css">
html, body {
@jpetto
jpetto / index.html
Created May 1, 2014 21:15
ASWM SP2014: Final starter
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>NY Times API Demo</title>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.4.2/pure-min.css">
<style type="text/css">
html, body {
background: #94bbd4;
@jpetto
jpetto / index.html
Last active August 29, 2015 13:58
ASWM: CW/HW - Basic Backbone Todo List
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Basic Backbone Todo List</title>
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/pure/0.4.2/pure-min.css">
<style type="text/css">
#app-title {
text-align: center;
border-bottom: 3px solid #000;
@jpetto
jpetto / gist:10331995
Last active August 29, 2015 13:58
ASWM: Backbone Model/View - basic example
// make/get a reference to our namespace
var MyApp = window.MyApp || {};
// create our VideoGame model with defaults
MyApp.VideoGame = Backbone.Model.extend({
defaults: {
title: 'Coming soon...',
publisher: '',
release_year: '',
box_art: 'placeholder.jpg',
@jpetto
jpetto / index.html
Last active August 29, 2015 13:58
ASWM CW: Underscore templates walkthrough
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Underscore Template Demo</title>
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/pure/0.4.2/pure-min.css">
<style type="text/css">
#todo-list {
margin-right: 40px;
}